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

Primary tabs

Git errors: Review of the 8.x-1.x branch (commit 02b3c4d):
  • 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 flag_search_api.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: .../drupal/pareviewsh/pareview_temp/src/Utility/FlagSearchApiHelper.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     25 | WARNING | Unused variable $inserted_item_ids.
    --------------------------------------------------------------------------
    
    
    FILE: ...drupal/pareviewsh/pareview_temp/src/Form/FlagSearchApiConfigForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
     36 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     41 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     43 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     49 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/flag_search_api.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     8 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
     9 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    Time: 496ms; 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: .../drupal/pareviewsh/pareview_temp/src/Utility/FlagSearchApiHelper.php
--------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------
  6 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
  8 | ERROR | [x] Missing class doc comment
 10 | ERROR | [x] Doc comment short description must end with a full stop
 12 | ERROR | [ ] Missing parameter comment
 12 | ERROR | [x] Data types in @param tags need to be fully namespaced
 14 | ERROR | [x] Expected 1 blank line before function; 0 found
 14 | ERROR | [x] Expected 1 space before opening brace; found 0
 16 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 16 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 38 | ERROR | [x] Expected 1 newline at end of file; 0 found
 38 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...viewsh/pareview_temp/src/Plugin/search_api/processor/FlagIndexer.php
--------------------------------------------------------------------------
FOUND 27 ERRORS AFFECTING 21 LINES
--------------------------------------------------------------------------
   1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
     |       |     line
  13 | ERROR | [ ] Missing short description in doc comment
  28 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
  49 | ERROR | [x] Expected one space after the comma, 2 found
  49 | ERROR | [x] Expected 1 space between comma and type hint
     |       |     "FlagService"; 2 found
  52 | ERROR | [x] Expected 1 blank line after function; 2 found
  59 | ERROR | [x] Short array syntax must be used to define arrays
  60 | ERROR | [x] Short array syntax must be used to define arrays
  62 | ERROR | [x] Expected 1 blank line after function; 0 found
  70 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
  70 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
  74 | ERROR | [x] Short array syntax must be used to define arrays
 101 | ERROR | [x] Expected 1 blank line after function; 0 found
 105 | ERROR | [x] Additional blank lines found at end of doc comment
 107 | ERROR | [x] Short array syntax must be used to define arrays
 126 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
 126 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 128 | ERROR | [x] Concat operator must be surrounded by a single space
 128 | ERROR | [x] Short array syntax must be used to define arrays
 136 | ERROR | [x] Expected 1 blank line after function; 2 found
 147 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
 147 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 148 | ERROR | [x] Expected one space after the comma, 0 found
 150 | ERROR | [x] Expected one space after the comma, 0 found
 151 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
 151 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 157 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 26 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...drupal/pareviewsh/pareview_temp/src/Form/FlagSearchApiConfigForm.php
--------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------
 15 | ERROR | [x] Expected 1 blank line before function; 0 found
 27 | ERROR | [x] Function comment short description must start with
    |       |     exactly one space
 34 | ERROR | [x] Short array syntax must be used to define arrays
 39 | ERROR | [x] Short array syntax must be used to define arrays
 45 | ERROR | [x] Functions must not contain multiple empty lines in a
    |       |     row; found 2 empty lines
 47 | ERROR | [x] Short array syntax must be used to define arrays
 56 | ERROR | [x] Function comment short description must start with
    |       |     exactly one space
 57 | ERROR | [x] Doc comment short description must end with a full stop
 57 | ERROR | [ ] Doc comment short description must be on a single line,
    |       |     further text should be a separate paragraph
 69 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/flag_search_api.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 9 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...01/web/vendor/drupal/pareviewsh/pareview_temp/flag_search_api.module
--------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
    |       |     line
  3 | ERROR | [x] Doc comment short description must be on the first line
  3 | ERROR | [x] Doc comment short description must end with a full stop
 11 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 18 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 25 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 27 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 860ms; Memory: 4Mb