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

Primary tabs

Git errors: Review of the 8.x-1.x branch (commit af71796):
  • README.md or README.txt is missing, see the guidelines for in-project documentation.
  • ./simpleaddress.module: All functions should be prefixed with your module/theme name (simpleaddress) to avoid name clashes. See https://www.drupal.org/node/318#naming
    function _addressfield_country_options_list($field = NULL, $instance = NULL) {
    
  • 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: ...drupal/pareviewsh/pareview_temp/src/Tests/SimpleAddressFieldTest.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     45 | WARNING | There must be no blank line following an inline comment
    --------------------------------------------------------------------------
    
    
    FILE: .../drupal/pareviewsh/pareview_temp/src/Tests/SimpleAddressItemTest.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     86 | WARNING | Variable $new_ is undefined.
     89 | WARNING | Variable $new_ is undefined.
     91 | WARNING | Variable $new_ is undefined.
     92 | WARNING | Variable $new_ is undefined.
     99 | WARNING | Variable $new_ is undefined.
    --------------------------------------------------------------------------
    
    
    FILE: ...mp/src/Plugin/Field/FieldFormatter/SimpleAddressDefaultFormatter.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     30 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     61 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...iew_temp/src/Plugin/Field/FieldWidget/SimpleAddressDefaultWidget.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 7 LINES
    --------------------------------------------------------------------------
     45 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     52 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     59 | 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
     73 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     80 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     80 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     81 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...01/web/vendor/drupal/pareviewsh/pareview_temp/simpleaddress.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:"
    --------------------------------------------------------------------------
    
    Time: 617ms; Memory: 4Mb
    
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/css/simpleaddress.field.css
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 1 | ERROR | [x] Additional whitespace found at start of file
 3 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...upal/pareviewsh/pareview_temp/config/schema/simpleaddress.schema.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...drupal/pareviewsh/pareview_temp/src/Tests/SimpleAddressFieldTest.php
--------------------------------------------------------------------------
FOUND 19 ERRORS AND 5 WARNINGS AFFECTING 22 LINES
--------------------------------------------------------------------------
   6 | WARNING | [x] Unused use statement
   7 | WARNING | [x] Unused use statement
   7 | ERROR   | [x] There must be one blank line after the last USE
     |         |     statement; 2 found;
  20 | ERROR   | [x] Short array syntax must be used to define arrays
  23 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: 'simpleaddress'
  27 | ERROR   | [ ] Class property $web_user should use lowerCamel
     |         |     naming without underscores
  29 | ERROR   | [x] Missing function doc comment
  30 | ERROR   | [x] Short array syntax must be used to define arrays
  33 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: 'Field types'
  37 | ERROR   | [x] Visibility must be declared on method "setUp"
  37 | ERROR   | [x] Missing function doc comment
  40 | ERROR   | [x] Short array syntax must be used to define arrays
  41 | ERROR   | [x] Short array syntax must be used to define arrays
  45 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
  50 | ERROR   | [x] Visibility must be declared on method
     |         |     "testSimpleAddressField"
  53 | ERROR   | [x] Short array syntax must be used to define arrays
  58 | ERROR   | [x] Short array syntax must be used to define arrays
  66 | ERROR   | [x] Short array syntax must be used to define arrays
  72 | ERROR   | [x] Short array syntax must be used to define arrays
  81 | ERROR   | [x] Short array syntax must be used to define arrays
  95 | ERROR   | [x] Short array syntax must be used to define arrays
 106 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 111 | ERROR   | [x] Expected 1 blank line after function; 0 found
 112 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 23 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../drupal/pareviewsh/pareview_temp/src/Tests/SimpleAddressItemTest.php
--------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 11 LINES
--------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
  9 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] There must be one blank line after the last USE
    |         |     statement; 2 found;
 22 | ERROR   | [x] Short array syntax must be used to define arrays
 24 | ERROR   | [x] Missing function doc comment
 25 | ERROR   | [x] Short array syntax must be used to define arrays
 32 | ERROR   | [x] Missing function doc comment
 36 | ERROR   | [x] Short array syntax must be used to define arrays
 41 | ERROR   | [x] Short array syntax must be used to define arrays
 53 | ERROR   | [x] Short array syntax must be used to define arrays
 55 | ERROR   | [x] Short array syntax must be used to define arrays
 85 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...iewsh/pareview_temp/src/Plugin/Field/FieldType/SimpleAddressItem.php
--------------------------------------------------------------------------
FOUND 11 ERRORS AND 1 WARNING AFFECTING 12 LINES
--------------------------------------------------------------------------
  48 | ERROR   | [x] Short array syntax must be used to define arrays
  49 | ERROR   | [x] Short array syntax must be used to define arrays
  50 | ERROR   | [x] Short array syntax must be used to define arrays
  56 | ERROR   | [x] Short array syntax must be used to define arrays
  62 | ERROR   | [x] Short array syntax must be used to define arrays
  68 | ERROR   | [x] Short array syntax must be used to define arrays
  74 | ERROR   | [x] Short array syntax must be used to define arrays
  80 | ERROR   | [x] Short array syntax must be used to define arrays
  88 | ERROR   | [x] Expected 1 blank line after function; 2 found
 129 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: 'garden'
 132 | ERROR   | [ ] sizeof() is a function name alias, use count()
     |         |     instead
 139 | ERROR   | [ ] sizeof() is a function name alias, use count()
     |         |     instead
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...mp/src/Plugin/Field/FieldFormatter/SimpleAddressDefaultFormatter.php
--------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 10 LINES
--------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
  8 | ERROR   | [x] There must be one blank line after the last USE
    |         |     statement; 2 found;
 29 | ERROR   | [x] Short array syntax must be used to define arrays
 36 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 37 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 38 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 47 | ERROR   | [x] Short array syntax must be used to define arrays
 49 | ERROR   | [x] Whitespace found at end of line
 56 | ERROR   | [ ] Missing parameter comment
 56 | ERROR   | [ ] Missing parameter type
 58 | ERROR   | [ ] Description for the @return value is missing
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...iew_temp/src/Plugin/Field/FieldWidget/SimpleAddressDefaultWidget.php
--------------------------------------------------------------------------
FOUND 12 ERRORS AND 3 WARNINGS AFFECTING 15 LINES
--------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
  8 | WARNING | [x] Unused use statement
 29 | ERROR   | [x] Short array syntax must be used to define arrays
 38 | ERROR   | [x] Whitespace found at end of line
 43 | ERROR   | [x] Short array syntax must be used to define arrays
 50 | ERROR   | [x] Short array syntax must be used to define arrays
 57 | ERROR   | [x] Short array syntax must be used to define arrays
 64 | ERROR   | [x] Short array syntax must be used to define arrays
 71 | ERROR   | [x] Short array syntax must be used to define arrays
 78 | ERROR   | [x] Short array syntax must be used to define arrays
 80 | ERROR   | [x] Short array syntax must be used to define arrays
 86 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 89 | ERROR   | [x] Short array syntax must be used to define arrays
 95 | ERROR   | [x] Expected 1 blank line after function; 2 found
 98 | ERROR   | [x] The closing brace for the class must have an empty
    |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...1101/web/vendor/drupal/pareviewsh/pareview_temp/simpleaddress.module
--------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 7 LINES
--------------------------------------------------------------------------
 19 | ERROR   | [x] Short array syntax must be used to define arrays
 22 | ERROR   | [x] Expected 1 blank line after function; 2 found
 47 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 49 | ERROR   | [x] Short array syntax must be used to define arrays
 54 | ERROR   | [x] Line indented incorrectly; expected at least 14
    |         |     spaces, found 12
 55 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found
    |         |     10
 55 | ERROR   | [x] Closing brace indented incorrectly; expected 12
    |         |     spaces, found 10
 60 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...01/web/vendor/drupal/pareviewsh/pareview_temp/simpleaddress.info.yml
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by
   |         | drupal.org packaging automatically
--------------------------------------------------------------------------

Time: 1.06 secs; Memory: 4Mb