Revision of https://git.drupal.org/project/cg_payment.git from Thu, 01/10/2019 - 23:36

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 3ad058f):
  • 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/Manager/RequestManager.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
      44 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
      83 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     120 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     129 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     178 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...upal/pareviewsh/pareview_temp/src/Controller/PaymentCompletePage.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
      56 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
      64 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     109 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     120 | WARNING | Unused variable $error_text.
     122 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/src/Form/CreditGuard.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
      91 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     137 | 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
     148 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
     153 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    Time: 1.11 secs; 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: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 17 | ERROR | [x] A unary operator statement must not be followed by a
    |       |     space
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------
 35 | WARNING | Line exceeds 80 characters; contains 86 characters
 36 | WARNING | Line exceeds 80 characters; contains 89 characters
 40 | WARNING | Line exceeds 80 characters; contains 88 characters
 52 | WARNING | Line exceeds 80 characters; contains 107 characters
 58 | WARNING | Line exceeds 80 characters; contains 82 characters
 59 | WARNING | Line exceeds 80 characters; contains 86 characters
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Manager/RequestManager.php
--------------------------------------------------------------------------
FOUND 25 ERRORS AND 3 WARNINGS AFFECTING 28 LINES
--------------------------------------------------------------------------
  16 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
  17 | ERROR   | [x] There must be exactly one blank line before the tags
     |         |     in a doc comment
  29 | ERROR   | [ ] Missing short description in doc comment
  30 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  36 | ERROR   | [ ] Missing short description in doc comment
  46 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  48 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  50 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  54 | ERROR   | [ ] Missing short description in doc comment
  61 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  66 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  82 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  88 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ''
 107 | ERROR   | [ ] Inline doc block comments are not allowed; use "/*
     |         |     Comment */" or "// Comment" instead
 123 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 133 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 140 | ERROR   | [ ] Missing short description in doc comment
 148 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 195 | ERROR   | [ ] Missing short description in doc comment
 196 | ERROR   | [ ] Missing parameter comment
 197 | ERROR   | [ ] Description for the @return value is missing
 204 | ERROR   | [ ] Missing short description in doc comment
 205 | ERROR   | [ ] Missing parameter comment
 206 | ERROR   | [ ] Description for the @return value is missing
 213 | ERROR   | [ ] Missing short description in doc comment
 214 | ERROR   | [ ] Missing parameter comment
 215 | ERROR   | [ ] Description for the @return value is missing
 222 | ERROR   | [ ] Missing short description in doc comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...r/drupal/pareviewsh/pareview_temp/src/Manager/TransactionManager.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
 10 | ERROR   | [x] Doc comment short description must end with a full
    |         |     stop
 11 | ERROR   | [x] There must be exactly one blank line before the tags
    |         |     in a doc comment
 15 | ERROR   | [ ] Missing short description in doc comment
 33 | ERROR   | [x] Return comment indentation must be 3 spaces, found 2
    |         |     spaces
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...101/web/vendor/drupal/pareviewsh/pareview_temp/src/CgChargeEvent.php
--------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------
  8 | ERROR | [x] Missing class doc comment
 12 | ERROR | [ ] Missing short description in doc comment
 17 | ERROR | [ ] Missing short description in doc comment
 22 | ERROR | [ ] Parameter $request is not described in comment
 25 | ERROR | [ ] Missing parameter comment
 32 | ERROR | [ ] Missing short description in doc comment
 33 | ERROR | [ ] Description for the @return value is missing
 39 | ERROR | [ ] Missing short description in doc comment
 40 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...dor/drupal/pareviewsh/pareview_temp/src/Utility/TransactionTrait.php
--------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------
  6 | ERROR | [x] Doc comment short description must end with a full stop
 11 | ERROR | [x] Doc comment short description must end with a full stop
 13 | ERROR | [ ] Missing parameter comment
 15 | ERROR | [x] Parameter comment must end with a full stop
 17 | ERROR | [ ] Return type "\Drupal\cg_payment\TransactionInterface |
    |       |     bool" must not contain spaces
 20 | ERROR | [ ] Type hint "array" missing for $statuses
 21 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 26 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...iew_temp/src/Plugin/Validation/Constraint/ValidTerminalValidator.php
--------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------
 17 | ERROR | [x] Doc comment short description must end with a full stop
 46 | ERROR | [ ] Inline doc block comments are not allowed; use "/*
    |       |     Comment */" or "// Comment" instead
 51 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 56 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 64 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 77 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...wsh/pareview_temp/src/Plugin/Validation/Constraint/ValidTerminal.php
--------------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 8 LINES
--------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one
    |         |     blank line
 18 | ERROR   | [ ] Missing short description in doc comment
 21 | ERROR   | [ ] Class property $terminal_id_field_name should use
    |         |     lowerCamel naming without underscores
 23 | ERROR   | [ ] Missing short description in doc comment
 26 | ERROR   | [ ] Class property $mid_field_name should use lowerCamel
    |         |     naming without underscores
 28 | ERROR   | [ ] Missing short description in doc comment
 34 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: 'mid_field_name'
 37 | ERROR   | [x] Expected 1 newline at end of file; 0 found
 37 | 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: ...upal/pareviewsh/pareview_temp/src/Controller/PaymentCompletePage.php
--------------------------------------------------------------------------
FOUND 22 ERRORS AND 5 WARNINGS AFFECTING 24 LINES
--------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
     |         |     begin with a file doc comment
  17 | WARNING | [x] Unused use statement
  29 | ERROR   | [ ] Missing short description in doc comment
  32 | ERROR   | [ ] Class property $cg_request_manager should use
     |         |     lowerCamel naming without underscores
  35 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
  41 | ERROR   | [ ] Missing short description in doc comment
  52 | ERROR   | [ ] Description for the @return value is missing
  61 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  66 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  77 | ERROR   | [ ] Description for the @return value is missing
  86 | ERROR   | [ ] If the line declaring an array spans longer than 80
     |         |     characters, each element should be broken into its
     |         |     own line
  97 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 108 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 112 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 115 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 119 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 126 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 132 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 136 | ERROR   | [ ] Parameter $transaction is not described in comment
 136 | ERROR   | [ ] Parameter $is_success is not described in comment
 137 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
 138 | ERROR   | [x] There must be exactly one blank line before the tags
     |         |     in a doc comment
 138 | ERROR   | [ ] Missing parameter comment
 139 | ERROR   | [ ] Missing parameter comment
 139 | ERROR   | [ ] Missing parameter type
 152 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 156 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/src/RequestInterface.php
--------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------
 16 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 16 | ERROR | [x] Parameter comment must end with a full stop
 18 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 18 | ERROR | [x] Parameter comment must end with a full stop
 20 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 22 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 22 | ERROR | [x] Parameter comment must end with a full stop
 24 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 24 | ERROR | [x] Parameter comment must end with a full stop
 27 | ERROR | [x] Return comment indentation must be 3 spaces, found 4
    |       |     spaces
 29 | ERROR | [x] Expected 1 blank line after function; 0 found
 30 | ERROR | [x] The closing brace for the interface must have an empty
    |       |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/src/Form/CreditGuard.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 111 | ERROR | Missing parameter comment
 112 | ERROR | Missing parameter comment
--------------------------------------------------------------------------


FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.api.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 12 | ERROR | Doc comment short description must be on a single line,
    |       | further text should be a separate paragraph
--------------------------------------------------------------------------

Time: 2.06 secs; Memory: 6Mb