Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/flat_taxonomy/flat_taxonomy.module
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 5 WARNINGS AFFECTING 12 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
16 | WARNING | [ ] Global constants should not be used, move it to a class or interface
21 | WARNING | [ ] Global constants should not be used, move it to a class or interface
29 | ERROR | [x] Short array syntax must be used to define arrays
38 | WARNING | [x] '@TODO: Add a confirm step if the vocabulary is updated to be flatten and' should match the format '@todo Fix problem X here.'
45 | ERROR | [ ] Missing parameter comment
45 | ERROR | [ ] Missing parameter type
46 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter type
48 | ERROR | [ ] Missing parameter comment
74 | ERROR | [x] Short array syntax must be used to define arrays
74 | ERROR | [ ] The array declaration extends to column 222 (the limit is 80). The array content should be split up over multiple lines
75 | ERROR | [x] Short array syntax must be used to define arrays
75 | ERROR | [ ] The array declaration extends to column 215 (the limit is 80). The array content should be split up over multiple lines
77 | WARNING | [x] '@TODO: Update the term weight so it is ordered after the parent.' should match the format '@todo Fix problem X here.'
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/flat_taxonomy/flat_taxonomy.schema.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/flat_taxonomy/src/Flattener.php
-----------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
28 | ERROR | [ ] Missing short description in doc comment
33 | ERROR | [ ] Missing short description in doc comment
34 | ERROR | [ ] Missing parameter comment
44 | ERROR | [ ] Missing parameter comment
58 | ERROR | [ ] Missing parameter comment
59 | ERROR | [ ] Missing parameter comment
59 | ERROR | [ ] Missing parameter type
61 | ERROR | [x] Visibility must be declared on method "flatten_subtree"
61 | ERROR | [ ] Method name "Flattener::flatten_subtree" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------
Time: 1.75 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/flat_taxonomy/
Proposed resolution
Above error/warnings need to be fixed.