Problem/Motivation
FILE: /home/thallesvf/Desktop/lando/d8-contrib/modules/ctools/src/Form/RequiredContextDelete.php
---------------------------------------------------------------------------------------------------
FOUND 36 ERRORS AND 1 WARNING AFFECTING 31 LINES
---------------------------------------------------------------------------------------------------
17 | ERROR | [ ] Missing short description in doc comment
22 | ERROR | [ ] Missing short description in doc comment
25 | ERROR | [ ] Class property $tempstore_id should use lowerCamel naming without underscores
27 | ERROR | [ ] Missing short description in doc comment
28 | ERROR | [x] Expected "string" but found "string;" for @var tag in member variable comment
30 | ERROR | [ ] Class property $machine_name should use lowerCamel naming without underscores
32 | ERROR | [ ] Missing short description in doc comment
33 | ERROR | [x] Expected "int" but found "int;" for @var tag in member variable comment
44 | ERROR | [ ] Missing short description in doc comment
45 | ERROR | [ ] Missing parameter comment
47 | ERROR | [x] Visibility must be declared on method "__construct"
67 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
69 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
70 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
70 | ERROR | [x] Short array syntax must be used to define arrays
71 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
71 | ERROR | [x] Short array syntax must be used to define arrays
74 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
75 | ERROR | [x] Space found before square bracket; expected "$form[" but found "$form ["
77 | ERROR | [x] Short array syntax must be used to define arrays
100 | ERROR | [x] Short array syntax must be used to define arrays
123 | ERROR | [x] Short array syntax must be used to define arrays
124 | ERROR | [x] Short array syntax must be used to define arrays
127 | ERROR | [x] Short array syntax must be used to define arrays
128 | ERROR | [x] Short array syntax must be used to define arrays
130 | ERROR | [x] Short array syntax must be used to define arrays
131 | ERROR | [x] Short array syntax must be used to define arrays
164 | ERROR | [ ] Missing parameter comment
164 | ERROR | [ ] Missing parameter type
168 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
175 | ERROR | [ ] Missing parameter comment
175 | ERROR | [ ] Missing parameter type
177 | ERROR | [ ] Description for the @return value is missing
184 | ERROR | [ ] Missing parameter comment
184 | ERROR | [ ] Missing parameter type
186 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
186 | ERROR | [ ] Missing parameter type
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | diff_3101650_5-9.txt | 2.66 KB | andregp |
| #9 | 3101650-9.patch | 2.33 KB | andregp |
| #5 | interdiff_3-5.txt | 513 bytes | suresh prabhu parkala |
| #5 | 3101650-5.patch | 4.33 KB | suresh prabhu parkala |
| #3 | 3101650-3.patch | 4.31 KB | guilhermevp |
Comments
Comment #2
thallesFollow a patch!
Comment #3
guilhermevp commentedThe issue remains, but RequiredContextDelete.php has been upgraded and as such, the demands changed.
This patch address this demands.
Comment #4
adalbertov commentedHello, I have just looked into the patchs and found a warning, should it be fixed?
FILE: /home/adalbertov/Drupal/ctools/src/Form/RequiredContextDelete.php
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
180 | WARNING | Line exceeds 80 characters; contains 90 characters
-----------------------------------------------------------------------
Comment #5
suresh prabhu parkala commentedUpdated patch.
Comment #6
adalbertov commentedHello, I have just checked the patch and didn't find any phpcs errors so I'm moving it to RTBC
Comment #7
joelpittetChanging the name of a protected property/variable is an API change AFAIK because anything extending this class can use those properties.
Also the multi line array in comment needs a further indent.
Comment #8
andregp commentedI'll make these changes and resend send the patch.
Comment #9
andregp commentedHere is the new patch based on #5 with the corrections.
Comment #10
joelpittetThanks for fixing those issues and the coding standard ignore is a nice touch!