Hi @emarcarelli
I ran Check Drupal coding standards, you can review and fix it.
$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/paragraph_instances
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.links.menu.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.links.task.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.module
---------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
3 | ERROR | [x] Missing function doc comment
8 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
13 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
15 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
18 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.permissions.yml
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
2 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\paragraph_instances.routing.yml
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
19 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\paragraph_instances\src\Controller\InstancesController.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 6 WARNINGS AFFECTING 18 LINES
-------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
8 | ERROR | [x] Missing class doc comment
9 | ERROR | [x] Missing function doc comment
9 | ERROR | [x] Expected 1 blank line before function; 0 found
21 | ERROR | [x] Missing function doc comment
23 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
34 | ERROR | [x] Missing function doc comment
41 | WARNING | [x] A comma should follow the last multiline array item. Found: $paragraphType
45 | WARNING | [ ] Line exceeds 80 characters; contains 132 characters
45 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
47 | WARNING | [x] A comma should follow the last multiline array item. Found: id
56 | ERROR | [x] Use "elseif" in place of "else if"
67 | WARNING | [x] A comma should follow the last multiline array item. Found: 1
85 | ERROR | [x] Missing function doc comment
89 | WARNING | [x] A comma should follow the last multiline array item. Found: $id
96 | ERROR | [x] Use "elseif" in place of "else if"
101 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
102 | ERROR | [x] Expected 1 blank line after function; 0 found
103 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
Time: 262ms; Memory: 8MB
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | coding_standard_fixes-3282947-3.patch | 8.85 KB | urvashi_vora |
Comments
Comment #2
urvashi_vora commentedI am working on this
Comment #3
urvashi_vora commentedHi,
Please review this patch.
Thanks
Comment #4
emarcarelli commented