After checking for Drupal coding standards following errors were found
FILE: C:\Users\Administrator\Sites\devdesktop\drupal8practice\modules\term_depth_condition\src\Plugin\Condition\TermDepth.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
-----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
28 | ERROR | [x] Additional blank lines found at end of doc comment
32 | ERROR | [x] Function comment short description must start with exactly one space
34 | ERROR | [x] Data types in @var tags need to be fully namespaced
41 | ERROR | [x] Data types in @param tags need to be fully namespaced
62 | ERROR | [x] Opening brace should be on the same line as the declaration
81 | ERROR | [x] Short array syntax must be used to define arrays
98 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
99 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
121 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
164 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3077207-4.patch | 3.34 KB | silvi.addweb |
| #3 | coding_standards-3077201-3.patch | 3.28 KB | Deepthi kumari |
| #2 | term_depth_condition-drupal_coding_standards-3077207-#1.patch | 3.28 KB | rutuj |
Comments
Comment #2
rutuj commentedi am providing a patch to fix this issue
Comment #3
Deepthi kumari commentedThe above patch looks fine but found a small end of line issue in phpcs as below
FILE: E:\xampp\htdocs\skdrupal\web\modules\contrib\term_depth_condition\src\Plugin\Condition\TermDepth.php
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
Time: 4.35 secs; Memory: 10MB
Fixed the issue and applied patch.
Comment #4
silvi.addweb commentedFound one issue which I've solved in this patch
Comment #5
cleavinjosh commentedHi @silvi.addweb,
I applied patch#4, it was applied smoothly and fixed the phpcs issues.
RTBC+1 for me.
Thank you.