Problem/Motivation
FILE: /home/lenovo/d7to9/web/modules/contrib/ckeditor_accordion/src/Plugin/CKEditorPlugin/CKEditorAccordion.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
48 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
-----------------------------------------------------------------------------------------------------------------------------------
FILE: /home/lenovo/d7to9/web/modules/contrib/ckeditor_accordion/src/Plugin/CKEditor4To5Upgrade/Accordion.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\ckeditor5\HTMLRestrictions.
12 | ERROR | [ ] Missing short description in doc comment
32 | ERROR | [ ] Public method name "Accordion::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in lowerCamel format
45 | ERROR | [ ] Public method name "Accordion::mapCKEditor4SettingsToCKEditor5Configuration" is not in lowerCamel format
52 | ERROR | [ ] Public method name "Accordion::computeCKEditor5PluginSubsetConfiguration" is not in lowerCamel format
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /home/lenovo/d7to9/web/modules/contrib/ckeditor_accordion/src/Form/CkeditorAccordionSettingsForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
61 | WARNING | [x] A comma should follow the last multiline array item. Found: )
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /home/lenovo/d7to9/web/modules/contrib/ckeditor_accordion/css/accordion.frontend.css
------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
121 | ERROR | [x] Blank lines are not allowed in class definitions
127 | ERROR | [ ] Class definition is empty
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------
FILE: /home/lenovo/d7to9/web/modules/contrib/ckeditor_accordion/ckeditor_accordion.install
------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------
Time: 81ms; Memory: 10MB
Steps to reproduce
Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig ckeditor_accordion/
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
roshni27 commentedSome issues which are better know to maintainer are pending and all remaining issues solve by me. Please review the patch.
Comment #3
clarkssquared commentedHi roshni27
I applied your patch #2 and confirmed that it fixed most of the PHPCS issues, will retain this to needs review for maintainer's response about the remaining PHPCS issues, for convenience below are the remaining issues that is shown in my terminal.
FILE: /Users/studenttrainees/ckeditor_accordion/css/accordion.frontend.css
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
126 | ERROR | Class definition is empty
--------------------------------------------------------------------------
FILE: /Users/studenttrainees/ckeditor_accordion/src/Plugin/CKEditor4To5Upgrade/Accordion.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------------------
12 | ERROR | Missing short description in doc comment
32 | ERROR | Public method name "Accordion::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in lowerCamel format
45 | ERROR | Public method name "Accordion::mapCKEditor4SettingsToCKEditor5Configuration" is not in lowerCamel format
52 | ERROR | Public method name "Accordion::computeCKEditor5PluginSubsetConfiguration" is not in lowerCamel format
--------------------------------------------------------------------------------------------------------------------------
Time: 259ms; Memory: 10MB
Command I executed: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ckeditor_accordion
Please look at the attached file for your reference,
Thank you
Comment #4
roshni27 commentedHi clarkssquared,
Thanks to review.
I have mention on above comment some issues are remain which better know to maintainer.
Comment #5
shyam_bhattAdded a new patch, to fix all warnings/errors reported by PHP_CodeSniffer. Please check and review.
+ Needs Review.
Comment #6
clarkssquared commentedHi Shyam
I applied your patch #5 and I confirmed that it fixes all the PHPCS issues.
Thanks
Comment #7
j-vee commentedFixed all but the function renaming, thanks!