Problem/Motivation
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x-new/drupal1/modules/contrib/entityreference_dragdrop/entityreference_dragdrop.module
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
25 | ERROR | [ ] Missing parameter comment
27 | ERROR | [ ] Type hint "array" missing for $variables
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x-new/drupal1/modules/contrib/entityreference_dragdrop/README.txt
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
1 | ERROR | File contains UTF-8 byte order mark, which may corrupt your application
-----------------------------------------------------------------------------------------------------------------
FILE: ....goyal/Documents/MySites/10.1.x-new/drupal1/modules/contrib/entityreference_dragdrop/src/Plugin/Field/FieldWidget/EntityReferenceDragDropWidget.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 38 ERRORS AND 4 WARNINGS AFFECTING 32 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
31 | WARNING | [ ] There must be no blank line following an inline comment
31 | ERROR | [x] Comments may not appear after statements
33 | ERROR | [ ] Missing short description in doc comment
38 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter comment
48 | ERROR | [ ] Missing parameter comment
49 | ERROR | [ ] Missing parameter comment
50 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] Missing parameter comment
52 | ERROR | [ ] Missing parameter comment
102 | WARNING | [x] A comma should follow the last multiline array item. Found: )
109 | WARNING | [x] A comma should follow the last multiline array item. Found: )
143 | ERROR | [x] Concat operator must be surrounded by a single space
153 | WARNING | [x] A comma should follow the last multiline array item. Found: 'just some value so #required does not trigger validation error.'
158 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
221 | ERROR | [ ] Missing parameter comment
222 | ERROR | [x] Separate the @param and @return sections by a blank line.
222 | ERROR | [ ] Description for the @return value is missing
242 | ERROR | [ ] Missing parameter comment
243 | ERROR | [ ] Missing parameter comment
243 | ERROR | [ ] Missing parameter type
244 | ERROR | [ ] Missing parameter comment
244 | ERROR | [ ] Missing parameter type
245 | ERROR | [ ] Missing parameter comment
246 | ERROR | [ ] Missing parameter comment
247 | ERROR | [x] Separate the @param and @return sections by a blank line.
247 | ERROR | [ ] Description for the @return value is missing
250 | ERROR | [x] Inline comments must start with a capital letter
250 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
300 | ERROR | [ ] Missing parameter comment
301 | ERROR | [ ] Missing parameter comment
301 | ERROR | [ ] Missing parameter type
302 | ERROR | [x] Separate the @param and @return sections by a blank line.
302 | ERROR | [ ] Description for the @return value is missing
311 | ERROR | [ ] Missing parameter comment
312 | ERROR | [ ] Missing parameter comment
312 | ERROR | [ ] Missing parameter type
313 | ERROR | [x] Separate the @param and @return sections by a blank line.
313 | ERROR | [ ] Description for the @return value is missing
322 | ERROR | [ ] Description for the @return value is missing
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 114ms; Memory: 10MBSteps to reproduce
Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /modules/contrib/entityreference_dragdrop
Proposed resolution
Fix all the phpcs issues and warnings
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3346881-2.patch | 9.03 KB | sahil.goyal |
Comments
Comment #2
sahil.goyal commentedFix all the PHP coding standard issues and warnings, Readme warning left as it should be cover in another ticket.
Comment #3
nayana_mvr commentedReviewed the patch #2. Patch applied cleanly and except the Readme warning, all other issues are fixed.
Comment #4
avpadernoComment #5
sahil.goyal commentedAs i suggest, we can cover up this issue in another ticket as mentioned in #2 as it must be replaced with markdown template
Comment #7
sergei_brill commented