https://git.drupal.org/project/auditfiles.git

Primary tabs

Git errors: Review of the 8.x-2.x branch (commit 9fe074d):
  • 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: .../pareviewsh/pareview_temp/src/ServiceAuditFilesReferencedNotUsed.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
      64 | WARNING | Unused variable $files_in_fields.
      69 | WARNING | Unused variable $key.
     118 | WARNING | Unused variable $config.
     145 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: .../pareviewsh/pareview_temp/src/ServiceAuditFilesUsedNotReferenced.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     72 | WARNING | Unused variable $key.
    --------------------------------------------------------------------------
    
    
    FILE: ...pal/pareviewsh/pareview_temp/src/ServiceAuditFilesUsedNotManaged.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     55 | WARNING | There must be no blank line following an inline comment
    --------------------------------------------------------------------------
    
    
    FILE: ...upal/pareviewsh/pareview_temp/src/ServiceAuditFilesNotInDatabase.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 6 LINES
    --------------------------------------------------------------------------
     158 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     161 | WARNING | format_date() calls should be avoided in classes, use
         |         | dependency injection and the "date.formatter" service
         |         | instead
     380 | WARNING | User::load calls should be avoided in classes, use
         |         | dependency injection instead
     380 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     386 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     390 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     399 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...areviewsh/pareview_temp/src/ServiceAuditFilesMergeFileReferences.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     120 | WARNING | format_date() calls should be avoided in classes, use
         |         | dependency injection and the "date.formatter" service
         |         | instead
     212 | WARNING | Unused variable $file_being_kept_name_results.
     278 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
     285 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     292 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...al/pareviewsh/pareview_temp/src/Form/AuditFilesReferencedNotUsed.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     148 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     151 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     176 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     268 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     271 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...rupal/pareviewsh/pareview_temp/src/Form/AuditFilesUsedNotManaged.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
     137 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     140 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     169 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     229 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...r/drupal/pareviewsh/pareview_temp/src/Form/AuditFilesNotOnServer.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     109 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
     145 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     149 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     182 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     242 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...rupal/pareviewsh/pareview_temp/src/Form/AuditFilesManagedNotUsed.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     108 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
     141 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     145 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     172 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     231 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...drupal/pareviewsh/pareview_temp/src/Form/AuditFilesNotInDatabase.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
     151 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     180 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     274 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     277 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: .../pareviewsh/pareview_temp/src/Form/AuditFilesMergeFileReferences.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
    --------------------------------------------------------------------------
     143 | WARNING | format_date() calls should be avoided in classes, use
         |         | dependency injection and the "date.formatter" service
         |         | instead
     228 | WARNING | format_date() calls should be avoided in classes, use
         |         | dependency injection and the "date.formatter" service
         |         | instead
     260 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     264 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     298 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     353 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     397 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...al/pareviewsh/pareview_temp/src/Form/AuditFilesUsedNotReferenced.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     110 | WARNING | File::load calls should be avoided in classes, use
         |         | dependency injection instead
     142 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     145 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     174 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     232 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...vendor/drupal/pareviewsh/pareview_temp/src/Form/AuditFilesConfig.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     40 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    Time: 4.81 secs; Memory: 8Mb
    
  • 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: .../pareviewsh/pareview_temp/src/ServiceAuditFilesReferencedNotUsed.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 27 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
 41 | ERROR   | [ ] Class property $entity_field_manager should use
    |         |     lowerCamel naming without underscores
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../pareviewsh/pareview_temp/src/ServiceAuditFilesUsedNotReferenced.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 27 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
 41 | ERROR   | [ ] Class property $entity_field_manager should use
    |         |     lowerCamel naming without underscores
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/src/ServiceAuditFilesUsedNotManaged.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 25 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
 34 | ERROR   | [ ] Parameter $translation is not described in comment
 36 | ERROR   | [x] There must be exactly one blank line before the tags
    |         |     in a doc comment
 55 | WARNING | [x] There must be no blank line following an inline
    |         |     comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...upal/pareviewsh/pareview_temp/src/ServiceAuditFilesNotInDatabase.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 26 | ERROR | Class property $config_factory should use lowerCamel naming
    |       | without underscores
 40 | ERROR | Class property $stream_wrapper_manage should use lowerCamel
    |       | naming without underscores
--------------------------------------------------------------------------


FILE: ...drupal/pareviewsh/pareview_temp/src/ServiceAuditFilesNotOnServer.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 24 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
 38 | ERROR   | [ ] Class property $date_formatter should use lowerCamel
    |         |     naming without underscores
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...areviewsh/pareview_temp/src/ServiceAuditFilesMergeFileReferences.php
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 26 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...al/pareviewsh/pareview_temp/src/Form/AuditFilesReferencedNotUsed.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------
 11 | WARNING | [x] Unused use statement
 12 | ERROR   | [x] There must be one blank line after the last USE
    |         |     statement; 2 found;
 27 | ERROR   | [ ] Missing short description in doc comment
 28 | ERROR   | [ ] Missing parameter comment
 28 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...rupal/pareviewsh/pareview_temp/src/Form/AuditFilesUsedNotManaged.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 11 | WARNING | [x] Unused use statement
 26 | ERROR   | [ ] Missing short description in doc comment
 27 | ERROR   | [ ] Missing parameter comment
 27 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...r/drupal/pareviewsh/pareview_temp/src/Form/AuditFilesNotOnServer.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 12 | WARNING | [x] Unused use statement
 27 | ERROR   | [ ] Missing short description in doc comment
 28 | ERROR   | [ ] Missing parameter comment
 28 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...rupal/pareviewsh/pareview_temp/src/Form/AuditFilesManagedNotUsed.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 12 | WARNING | [x] Unused use statement
 27 | ERROR   | [ ] Missing short description in doc comment
 28 | ERROR   | [ ] Missing parameter comment
 28 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...drupal/pareviewsh/pareview_temp/src/Form/AuditFilesNotInDatabase.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 11 | WARNING | [x] Unused use statement
 26 | ERROR   | [ ] Missing short description in doc comment
 27 | ERROR   | [ ] Missing parameter comment
 27 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../pareviewsh/pareview_temp/src/Form/AuditFilesMergeFileReferences.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 12 | WARNING | [x] Unused use statement
 27 | ERROR   | [ ] Missing short description in doc comment
 28 | ERROR   | [ ] Missing parameter comment
 28 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...al/pareviewsh/pareview_temp/src/Form/AuditFilesUsedNotReferenced.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------
 12 | WARNING | [x] Unused use statement
 26 | ERROR   | [x] Whitespace found at end of line
 27 | ERROR   | [ ] Missing short description in doc comment
 28 | ERROR   | [ ] Missing parameter comment
 28 | ERROR   | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/src/ServiceAuditFilesManagedNotUsed.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 24 | ERROR   | [ ] Class property $config_factory should use lowerCamel
    |         |     naming without underscores
 38 | ERROR   | [ ] Class property $date_formatter should use lowerCamel
    |         |     naming without underscores
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 7.79 secs; Memory: 8Mb