https://git.drupal.org/project/faqfield.git 8.x-1.x

Primary tabs

Review of the 8.x-1.x branch (commit 44d2c1b):
  • Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
  • ESLint has found some issues with your code (please check the JavaScript coding standards).
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/faqfield.accordion.js: line 8, col 3, Error - Strings must use singlequote. (quotes)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/faqfield.accordion.js: line 12, col 35, Error - Expected '!==' and instead saw '!='. (eqeqeq)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/faqfield.accordion.js: line 12, col 38, Error - Unexpected use of undefined. (no-undefined)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/faqfield.accordion.js: line 16, col 9, Error - The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype. (guard-for-in)
    
    4 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ..._temp/src/Plugin/Field/FieldFormatter/FaqFieldAccordionFormatter.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 23 WARNINGS AFFECTING 20 LINES
    --------------------------------------------------------------------------
      52 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      53 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      55 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      62 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      65 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      65 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      66 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      66 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      67 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      67 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      69 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      74 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      76 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      81 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      84 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     123 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     125 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     130 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     133 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     136 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     139 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     142 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     145 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...temp/src/Plugin/Field/FieldFormatter/FaqFieldAnchorListFormatter.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
    --------------------------------------------------------------------------
     45 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     48 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     49 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     51 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     64 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     67 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...pareview_temp/src/Plugin/Field/FieldWidget/FaqFieldDefaultWidget.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
    --------------------------------------------------------------------------
     109 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     120 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     164 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     165 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     166 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     167 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     168 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/faqfield.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     7 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    Time: 803ms; 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: ...pareviewsh/pareview_temp/src/Plugin/Field/FieldType/FaqFieldItem.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
 33 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 34 | ERROR | [x] Array closing indentation error, expected 4 spaces but
    |       |     found 6
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ew_temp/src/Plugin/Field/FieldFormatter/FaqFieldDetailsFormatter.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
    |         |     begin with a file doc comment
  6 | ERROR   | [ ] Doc comment short description must be on a single
    |         |     line, further text should be a separate paragraph
 13 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ..._temp/src/Plugin/Field/FieldFormatter/FaqFieldAccordionFormatter.php
--------------------------------------------------------------------------
FOUND 10 ERRORS AND 5 WARNINGS AFFECTING 15 LINES
--------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
     |         |     begin with a file doc comment
  32 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  33 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  34 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  35 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  36 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  40 | ERROR   | [x] Array closing indentation error, expected 4 spaces
     |         |     but found 6
  65 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
  66 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
  67 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
 131 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
 134 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
 139 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
 164 | ERROR   | [x] Object operator not indented correctly; expected 6
     |         |     spaces but found 8
 166 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...temp/src/Plugin/Field/FieldFormatter/FaqFieldAnchorListFormatter.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
 32 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 33 | ERROR | [x] Array closing indentation error, expected 4 spaces but
    |       |     found 6
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../src/Plugin/Field/FieldFormatter/FaqFieldDefinitionListFormatter.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not
   |       |     begin with a file doc comment
 6 | ERROR | [ ] Doc comment short description must be on a single line,
   |       |     further text should be a separate paragraph
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...temp/src/Plugin/Field/FieldFormatter/FaqFieldSimpleTextFormatter.php
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
    |         |     begin with a file doc comment
 37 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pareview_temp/src/Plugin/Field/FieldWidget/FaqFieldDefaultWidget.php
--------------------------------------------------------------------------
FOUND 6 ERRORS AND 3 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
     |         |     begin with a file doc comment
  33 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  34 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  35 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  36 | ERROR   | [x] Array indentation error, expected 6 spaces but found
     |         |     8
  42 | ERROR   | [x] Array closing indentation error, expected 4 spaces
     |         |     but found 6
 208 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
 211 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
 212 | WARNING | [ ] Do not concatenate strings to translatable strings,
     |         |     they should be part of the t() argument and you
     |         |     should use placeholders
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/faqfield.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 7 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../site1101/web/vendor/drupal/pareviewsh/pareview_temp/faqfield.module
--------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
  86 | ERROR | Type hint "array" missing for $variables
 101 | ERROR | Type hint "array" missing for $variables
 116 | ERROR | Type hint "array" missing for $variables
 136 | ERROR | Type hint "array" missing for $variables
 158 | ERROR | Type hint "array" missing for $variables
--------------------------------------------------------------------------

Time: 1.61 secs; Memory: 6Mb