Revision of https://git.drupal.org/project/spectra_connect.git from Sat, 03/09/2019 - 14:23

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 9199829):
  • README.md or README.txt is missing, see the guidelines for in-project documentation.
  • The "?>" PHP delimiter at the end of files is discouraged, see https://www.drupal.org/node/318#phptags
    ./src/SpectraConnectInterface.php
    
  • 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: ...ndor/drupal/pareviewsh/pareview_temp/src/Form/SpectraConnectForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES
    --------------------------------------------------------------------------
      46 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
      86 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      87 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      94 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      95 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     102 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     103 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     110 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     111 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     118 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     119 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    Time: 950ms; 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: .../web/vendor/drupal/pareviewsh/pareview_temp/spectra_connect.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ndor/drupal/pareviewsh/pareview_temp/spectra_connect.permissions.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ndor/drupal/pareviewsh/pareview_temp/src/SpectraConnectUtilities.php
--------------------------------------------------------------------------
FOUND 26 ERRORS AFFECTING 18 LINES
--------------------------------------------------------------------------
   3 | ERROR | [x] Namespaced classes, interfaces and traits should not
     |       |     begin with a file doc comment
   6 | ERROR | [x] Doc comment short description must be on the first
     |       |     line
   6 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
  15 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
  16 | ERROR | [x] There must be exactly one blank line before the tags
     |       |     in a doc comment
  22 | ERROR | [x] Missing function doc comment
  26 | ERROR | [ ] Missing short description in doc comment
  27 | ERROR | [ ] Missing parameter comment
  27 | ERROR | [ ] Missing parameter type
  28 | ERROR | [ ] Missing parameter comment
  28 | ERROR | [ ] Missing parameter type
  30 | ERROR | [ ] Public method name
     |       |     "SpectraConnectUtilities::spectra_queue_delete" is not
     |       |     in lowerCamel format
  39 | ERROR | [x] Missing function doc comment
  39 | ERROR | [ ] Public method name
     |       |     "SpectraConnectUtilities::spectra_delete" is not in
     |       |     lowerCamel format
  67 | ERROR | [x] Missing function doc comment
  67 | ERROR | [ ] Public method name
     |       |     "SpectraConnectUtilities::spectra_get" is not in
     |       |     lowerCamel format
  82 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 101 | ERROR | [ ] Missing short description in doc comment
 102 | ERROR | [ ] Missing parameter comment
 102 | ERROR | [ ] Missing parameter type
 103 | ERROR | [ ] Missing parameter comment
 103 | ERROR | [ ] Missing parameter type
 105 | ERROR | [ ] Public method name
     |       |     "SpectraConnectUtilities::spectra_queue_post" is not
     |       |     in lowerCamel format
 114 | ERROR | [x] Missing function doc comment
 114 | ERROR | [ ] Public method name
     |       |     "SpectraConnectUtilities::spectra_post" is not in
     |       |     lowerCamel format
 142 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...eb/vendor/drupal/pareviewsh/pareview_temp/src/SpectraConnectTest.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 13 | ERROR | [x] Doc comment short description must end with a full stop
 14 | ERROR | [x] There must be exactly one blank line before the tags in
    |       |     a doc comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ndor/drupal/pareviewsh/pareview_temp/src/SpectraConnectInterface.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
  9 | ERROR | [x] There must be exactly one blank line before the tags in
    |       |     a doc comment
 15 | ERROR | [x] Expected 1 newline at end of file; 0 found
 15 | ERROR | [x] A closing tag is not permitted at the end of a PHP file
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...wsh/pareview_temp/src/Plugin/QueueWorker/SpectraConnectQueuePost.php
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 17 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...review_temp/src/Plugin/QueueWorker/SpectraConnectQueueDeleteBase.php
--------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] There must be one blank line after the last USE
    |         |     statement; 2 found;
 12 | ERROR   | [x] Missing class doc comment
 17 | ERROR   | [x] Doc comment short description must start with a
    |         |     capital letter
 17 | ERROR   | [x] Doc comment short description must end with a full
    |         |     stop
 42 | ERROR   | [x] Expected 1 newline at end of file; 0 found
 42 | ERROR   | [x] The closing brace for the class must have an empty
    |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pareview_temp/src/Plugin/QueueWorker/SpectraConnectQueuePostBase.php
--------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] There must be one blank line after the last USE
    |         |     statement; 2 found;
 12 | ERROR   | [x] Missing class doc comment
 17 | ERROR   | [x] Doc comment short description must start with a
    |         |     capital letter
 17 | ERROR   | [x] Doc comment short description must end with a full
    |         |     stop
 42 | ERROR   | [x] Expected 1 newline at end of file; 0 found
 42 | ERROR   | [x] The closing brace for the class must have an empty
    |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...h/pareview_temp/src/Plugin/QueueWorker/SpectraConnectQueueDelete.php
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 17 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pareviewsh/pareview_temp/src/Controller/SpectraConnectController.php
--------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
    |       |     line
  2 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
  2 | ERROR | [ ] Missing short description in doc comment
 14 | ERROR | [x] Doc comment short description must end with a full stop
 19 | ERROR | [x] Opening brace should be on the same line as the
    |       |     declaration
 21 | ERROR | [x] Missing function doc comment
 56 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ndor/drupal/pareviewsh/pareview_temp/src/Form/SpectraConnectForm.php
--------------------------------------------------------------------------
FOUND 16 ERRORS AND 2 WARNINGS AFFECTING 18 LINES
--------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one
     |         |     blank line
   2 | ERROR   | [x] Namespaced classes, interfaces and traits should not
     |         |     begin with a file doc comment
  12 | WARNING | [x] Unused use statement
  42 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
  45 | ERROR   | [x] Short array syntax must be used to define arrays
  46 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
  47 | ERROR   | [x] Inline comments must start with a capital letter
  48 | ERROR   | [x] Namespaced classes/interfaces/traits should be
     |         |     referenced with use statements
  50 | ERROR   | [x] Namespaced classes/interfaces/traits should be
     |         |     referenced with use statements
  76 | ERROR   | [x] Short array syntax must be used to define arrays
  85 | ERROR   | [x] Short array syntax must be used to define arrays
  93 | ERROR   | [x] Short array syntax must be used to define arrays
 101 | ERROR   | [x] Short array syntax must be used to define arrays
 109 | ERROR   | [x] Short array syntax must be used to define arrays
 117 | ERROR   | [x] Short array syntax must be used to define arrays
 139 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 146 | ERROR   | [x] Expected 1 blank line after function; 0 found
 147 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...rupal/pareviewsh/pareview_temp/src/Form/SpectraConnectDeleteForm.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
 19 | ERROR | [x] Expected 1 space before opening brace; found 2
 25 | ERROR | [x] Short array syntax must be used to define arrays
 47 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/src/Form/SpectraConnectSettingsForm.php
--------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 15 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
    |       |     line
  2 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
 20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 26 | ERROR | [x] Expected 1 blank line before function; 0 found
 27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...1/web/vendor/drupal/pareviewsh/pareview_temp/spectra_connect.install
--------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one
    |         |     blank line
  2 | ERROR   | [ ] Missing short description in doc comment
  9 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
 13 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 14 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 21 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 25 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
 25 | ERROR   | [x] Doc comment short description must end with a full
    |         |     stop
 28 | ERROR   | [x] Namespaced classes/interfaces/traits should be
    |         |     referenced with use statements
 30 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/spectra_connect.links.task.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 15 | 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/spectra_connect.module
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
   |       |     line
 2 | ERROR | [ ] Missing short description in doc comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 2.02 secs; Memory: 4Mb