https://git.drupal.org/project/menu_block.git 8.x-1.x

Primary tabs

Review of the 8.x-1.x branch (commit cc5fc51):
  • Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The REQUIREMENTS section is missing.
    • The INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • The menu_block.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Plugin/Block/MenuBlock.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     121 | WARNING | Unused variable $suggestion.
    --------------------------------------------------------------------------
    
    
    FILE: ...e1101/web/vendor/drupal/pareviewsh/pareview_temp/menu_block.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     6 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    Time: 264ms; Memory: 4Mb
    
  • No automated test cases were found, did you consider writing PHPUnit tests? This is not a requirement but encouraged for professional software development.
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Plugin/Block/MenuBlock.php
--------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------
  45 | ERROR | [x] Short array syntax must be used to define arrays
  77 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
 133 | ERROR | [x] Short array syntax must be used to define arrays
 148 | ERROR | [x] Short array syntax must be used to define arrays
 161 | ERROR | [x] Short array syntax must be used to define arrays
 162 | ERROR | [x] Short array syntax must be used to define arrays
 163 | ERROR | [x] Short array syntax must be used to define arrays
 176 | ERROR | [x] Short array syntax must be used to define arrays
 177 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../drupal/pareviewsh/pareview_temp/src/Plugin/Derivative/MenuBlock.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 21 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../pareview_temp/src/EventSubscriber/MenuBlockKernelViewSubscriber.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 65 | ERROR | [x] Visibility must be declared on method
    |       |     "getSubscribedEvents"
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/menu_block.module
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
 43 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 435ms; Memory: 4Mb