Problem/Motivation
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/smart_title/modules/smart_title_ui/src/Form/SmartTitleConfigForm.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
170 | ERROR | [x] list(...) is forbidden, use [...] instead.
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/smart_title/src/EntityViewDisplayAlterer.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
209 | ERROR | [x] Use null coalesce operator instead of ternary operator.
211 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
216 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
Time: 310ms; Memory: 12MB
Steps to reproduce
Run following command
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info smart_title
Proposed resolution
The above error needs to be fixed.
Comments
Comment #2
rohit rana commentedComment #3
rohit rana commentedComment #4
omkar_yewale commentedComment #5
omkar_yewale commentedHi, @rohit Patch applied but still getting these issues.
FILE: /smart_title/smart_title.module
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR
--------------------------------------------------------------------------------------------------------------------------------
78 | ERROR | [x] list(...) is forbidden, use [...] instead.
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------
FILE: /smart_title/smart_title.install
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
32 | ERROR | [x] list(...) is forbidden, use [...] instead.
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------
Comment #7
omkar_yewale commentedPlease review the !1 MR for all of the issues listed above and those that remain.
Comment #8
avpadernoThe verb needs to use the Simple Present tense and the third person singular.
That needs to be changed in a sentence too.
That is probably a call for the maintainers, since they know if the code of that method is complete or there is something that needs to be changed or added.
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
Comment #9
omkar_yewale commentedThank you for your feedback, MR and issue description updated.
Please review.
I'm skipping this issue for now.
/smart_title/smart_title.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
222 | WARNING | '@todo' should match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------
Comment #10
ashutosh ahirwal commentedProviding Patch with fixes of Drupal, DrupalPractice
Thanku
Comment #11
avpadernoThe last patch is not correct, as it does not fix what reported in previous comments. The MR is correct, for what I can see.
Comment #12
avpadernoThe status change is for what committed in the MR.
Comment #13
huzookaComment #14
huzookaI hope you don't mind if I also fix the spelling issues here.
Comment #15
huzookaLet's see what the CI process says... Should be all green.
Comment #16
huzookaThank you all!