Skip to content

Draft: Resolve #3285197 "Standard drupal fixes"

Closes #3285197

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml simple_toc_block/

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\css\simple-toc-block.css

FOUND 1 ERROR AFFECTING 1 LINE

1 | ERROR | [x] Expected 1 newline at end of file; 0 found

PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\simple_toc_block.info.yml

FOUND 1 ERROR AFFECTING 1 LINE

8 | ERROR | [x] Expected 1 newline at end of file; 0 found

PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\simple_toc_block.links.menu.yml

FOUND 1 ERROR AFFECTING 1 LINE

6 | ERROR | [x] Expected 1 newline at end of file; 0 found

PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\simple_toc_block.routing.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: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\src\Controller\SimpleTOCBlockController.php

FOUND 10 ERRORS AFFECTING 7 LINES

1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line 2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment 6 | ERROR | [x] There must be one blank line after the namespace declaration 7 | ERROR | [x] Missing class doc comment 8 | ERROR | [x] Missing function doc comment 8 | ERROR | [ ] Public method name "SimpleTOCBlockController::ShowForm" is not in lowerCamel format 8 | ERROR | [x] Expected 1 blank line before function; 0 found 9 | ERROR | [x] Short array syntax must be used to define arrays 14 | ERROR | [x] Expected 1 newline at end of file; 0 found 14 | ERROR | [x] The closing brace for the class must have an empty line before it

Time: 219ms; Memory: 8MB

$ phpcs --standard=Drupalpractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml simple_toc_block/

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\simple_toc_block\src\Controller\SimpleTOCBlockController.php

FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE

16 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead

Time: 122ms; Memory: 6MB

Merge request reports

Loading