Revision of https://git.drupal.org/project/file_management.git from Mon, 09/24/2018 - 06:20

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Review of the 8.x-1.x branch (commit 6fa8130):
  • README.md or README.txt is missing, see the guidelines for in-project documentation.
  • 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: ...01/web/vendor/drupal/pareviewsh/pareview_temp/src/FileManagement.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     174 | WARNING | Unused variable $module.
    --------------------------------------------------------------------------
    
    
    FILE: ...pareviewsh/pareview_temp/src/Controller/FileManagementController.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
     29 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     31 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     33 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     67 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...pal/pareviewsh/pareview_temp/src/Form/FileManagementEditFileForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
      28 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
      71 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
      86 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     113 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    Time: 642ms; 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: ...01/web/vendor/drupal/pareviewsh/pareview_temp/src/FileManagement.php
--------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
--------------------------------------------------------------------------
 111 | ERROR   | [x] Expected "bool" but found "boolean" for function
     |         |     return type
 128 | ERROR   | [ ] Doc comment short description must be on a single
     |         |     line, further text should be a separate paragraph
 132 | ERROR   | [ ] Missing parameter type
 135 | ERROR   | [ ] Type hint "array" missing for $form
 142 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ]
 154 | ERROR   | [ ] Doc comment short description must be on a single
     |         |     line, further text should be a separate paragraph
 211 | ERROR   | [x] Expected 1 blank line after function; 0 found
 212 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...sh/pareview_temp/src/Plugin/views/field/FileManagementOperations.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------
 15 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 39 | ERROR | [x] Whitespace found at end of line
 55 | ERROR | [x] Expected 1 blank line after function; 0 found
 56 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pareviewsh/pareview_temp/src/Controller/FileManagementController.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
 10 | ERROR | [ ] Doc comment short description must be on a single line,
    |       |     further text should be a separate paragraph
 88 | ERROR | [x] Expected 1 blank line after function; 0 found
 89 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/src/Form/FileManagementEditFileForm.php
--------------------------------------------------------------------------
FOUND 15 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------
  10 | ERROR   | [x] Missing class doc comment
  12 | ERROR   | [x] Missing function doc comment
  16 | ERROR   | [x] Visibility must be declared on method "buildForm"
  16 | ERROR   | [x] Missing function doc comment
  46 | ERROR   | [ ] Concatenating translatable strings is not allowed,
     |         |     use placeholders instead and only one string literal
  56 | ERROR   | [ ] Concatenating translatable strings is not allowed,
     |         |     use placeholders instead and only one string literal
  56 | ERROR   | [ ] String concat is not required here; use a single
     |         |     string instead
  67 | ERROR   | [ ] Concatenating translatable strings is not allowed,
     |         |     use placeholders instead and only one string literal
  67 | ERROR   | [ ] String concat is not required here; use a single
     |         |     string instead
 113 | ERROR   | [x] Namespaced classes/interfaces/traits should be
     |         |     referenced with use statements
 163 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 180 | WARNING | [ ] Line exceeds 80 characters; contains 159 characters
 180 | ERROR   | [x] Comments may not appear after statements
 180 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 184 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 192 | ERROR   | [x] Expected 1 blank line after function; 0 found
 193 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.07 secs; Memory: 4Mb