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

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 0b1e9c9):
  • README.md or README.txt is missing, see the guidelines for in-project documentation.
  • Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
  • The cg_payment.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
  • Bad line endings were found, always use unix style terminators. See https://www.drupal.org/coding-standards#indenting
    ./.gitignore:                                                  ASCII text, with no line terminators
    
    
  • 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: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.module
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     12 | WARNING | There must be no blank line following an inline comment
    --------------------------------------------------------------------------
    
    
    FILE: ...e1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     8 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    
    FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Manager/RequestManager.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 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
     179 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() 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
     132 | 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
     143 | 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
    --------------------------------------------------------------------------
    
    Time: 1.17 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 2 ERRORS AND 4 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------
 12 | WARNING | [x] There must be no blank line following an inline
    |         |     comment
 12 | ERROR   | [x] Inline comments must end in full-stops, exclamation
    |         |     marks, colons, question marks, or closing parentheses
 40 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: NULL
 41 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: ]
 42 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: ]
 44 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Manager/RequestManager.php
--------------------------------------------------------------------------
FOUND 26 ERRORS AND 3 WARNINGS AFFECTING 29 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
 223 | ERROR   | [ ] Description for the @return value is missing
--------------------------------------------------------------------------
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 17 ERRORS AFFECTING 16 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
    |       |     line
  4 | ERROR | [x] Missing interface doc comment
  6 | ERROR | [x] Doc comment short description must end with a full stop
  8 | ERROR | [ ] Missing parameter type
  9 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 10 | ERROR | [ ] Missing parameter type
 11 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 12 | ERROR | [ ] Missing parameter type
 13 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 14 | ERROR | [ ] Missing parameter type
 15 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 16 | ERROR | [ ] Missing parameter type
 17 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
    |       |     spaces
 20 | ERROR | [x] Return comment indentation must be 3 spaces, found 4
    |       |     spaces
 22 | ERROR | [x] Expected 1 blank line before function; 0 found
 23 | ERROR | [x] Expected 1 newline at end of file; 0 found
 23 | 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 7 ERRORS AND 7 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------
  38 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  49 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: 'fieldset'
  53 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  60 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  67 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  75 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ]
 109 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
 110 | ERROR   | [x] There must be exactly one blank line before the tags
     |         |     in a doc comment
 110 | ERROR   | [ ] Missing parameter comment
 111 | ERROR   | [ ] Missing parameter comment
 126 | ERROR   | [ ] Missing short description in doc comment
 127 | ERROR   | [ ] Missing parameter comment
 128 | ERROR   | [ ] Missing parameter comment
 149 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.api.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 12 | ERROR   | [ ] Doc comment short description must be on a single
    |         |     line, further text should be a separate paragraph
 14 | ERROR   | [x] Trailing punctuation for @see references is not
    |         |     allowed.
 22 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: 'field_mid'
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/cg_payment.install
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
 14 | ERROR   | [x] Inline comments must end in full-stops, exclamation
    |         |     marks, colons, question marks, or closing parentheses
 31 | ERROR   | [x] Inline comments must end in full-stops, exclamation
    |         |     marks, colons, question marks, or closing parentheses
 37 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: )
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 2.1 secs; Memory: 6Mb