Fix PHPCS Reported Issues

Created on 17 January 2024, 10 months ago
Updated 16 April 2024, 7 months ago

Problem/Motivation

The following phpcs issues were reported on executing the command:

vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/issuu_viewer

Steps to reproduce

Proposed resolution

FILE: /Users/qe42/Sites/contribution/web/modules/contrib/issuu_viewer/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

FILE: /Users/qe42/Sites/contribution/web/modules/contrib/issuu_viewer/src/Plugin/Field/FieldType/IssuuViewerDocumentId.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\Plugin\Field\FieldType\StringItemBase.
60 | ERROR | [ ] The array declaration extends to column 155 (the limit is 120). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/qe42/Sites/contribution/web/modules/contrib/issuu_viewer/src/Plugin/Field/FieldFormatter/IssuuViewerIframe.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.4

Component

Code

Created by

🇮🇳India mahtab_alam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024