phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/openy_mappings/
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/openy_mappings.links.action.yml
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/openy_mappings.module
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
19 | WARNING | [ ] Do not pass empty strings to t()
48 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/openy_mappings.page.inc
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
26 | WARNING | [ ] Unused variable $mapping.
46 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/openy_mappings.links.task.yml
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/openy_mappings.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/LocationMappingRepository.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 6 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
39 | ERROR | [x] Data types in @param tags need to be fully namespaced
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/MappingInterface.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
16 | WARNING | There must be no blank line following an inline comment
--------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/MappingListBuilder.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
30 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
35 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Controller/MappingAddController.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 6 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
18 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
24 | ERROR | [x] Data types in @param tags need to be fully namespaced
26 | ERROR | [x] Data types in @param tags need to be fully namespaced
38 | ERROR | [x] Data types in @var tags need to be fully namespaced
53 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
54 | WARNING | [ ] Line exceeds 80 characters; contains 117 characters
63 | ERROR | [x] Short array syntax must be used to define arrays
70 | ERROR | [x] Short array syntax must be used to define arrays
76 | ERROR | [x] Data types in @param tags need to be fully namespaced
85 | ERROR | [x] Short array syntax must be used to define arrays
86 | WARNING | [x] A comma should follow the last multiline array item. Found: )
94 | ERROR | [x] Data types in @param tags need to be fully namespaced
101 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
102 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/MappingRepository.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
29 | ERROR | [x] Data types in @param tags need to be fully namespaced
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Entity/MappingViewsData.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
19 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Entity/Mapping.php
-------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------
69 | ERROR | [x] Short array syntax must be used to define arrays
152 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
152 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
182 | ERROR | [x] Short array syntax must be used to define arrays
187 | ERROR | [x] Short array syntax must be used to define arrays
190 | ERROR | [x] Short array syntax must be used to define arrays
203 | ERROR | [x] Short array syntax must be used to define arrays
208 | ERROR | [x] Short array syntax must be used to define arrays
213 | ERROR | [x] Short array syntax must be used to define arrays
228 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/MembershipTypeMappingRepository.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
31 | ERROR | [x] Data types in @param tags need to be fully namespaced
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Form/MappingTypeForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------------------
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
22 | ERROR | [x] Short array syntax must be used to define arrays
31 | ERROR | [x] Short array syntax must be used to define arrays
34 | ERROR | [x] Short array syntax must be used to define arrays
49 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Form/MappingSettingsForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Form/MappingForm.php
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------
19 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
21 | WARNING | [ ] Unused variable $entity.
30 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/contribution/web/modules/contrib/openy_mappings/src/Form/MappingTypeDeleteForm.php
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
18 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3358417-8.patch | 22.61 KB | imustakim |
| #4 | Screenshot 3358417.png | 28.85 KB | arpitk |
Issue fork openy_mappings-3358417
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
himanshu_jhaloya commentedComment #4
arpitk commentedI reviewed the MR and able to verify the changes results no more phpcs errors or warnings. Please view the attached screenshot.
Thanks!
Comment #5
avpadernoComment #6
avpadernoIf a code line must be removed, it is not commented out. Also, periods are not added to commented out code because code is not a sentence.
Furthermore, if that line is removed, also the comment about that line must be removed.
Since that documentation comment is edited, the missing articles in the parameter descriptions must be added too.
The second line has been truncated too early. (There are not rules about splitting a line at the first comma.)
Provides is not necessary (in this and similar descriptions).
Only the first word in a description must be capitalized.
Comment #7
imustakim commentedComment #8
imustakim commentedPatch updated.
Please review.
Comment #10
podaroktnx