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

Primary tabs

Review of the 8.x-1.x branch (commit fa9ab65):
  • 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/shuffle.js: line 69, col 38, Warning - Too many nested callbacks (4). Maximum allowed is 3. (max-nested-callbacks)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/shuffle.js: line 91, col 50, Error - Expected '===' and instead saw '=='. (eqeqeq)
    
    2 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...eview_temp/src/Plugin/Field/FieldFormatter/ShuffleFieldFormatter.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 13 WARNINGS AFFECTING 13 LINES
    --------------------------------------------------------------------------
     233 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     236 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     246 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     271 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     276 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     281 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     286 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     297 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     301 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     306 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     311 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     317 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     401 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...site1101/web/vendor/drupal/pareviewsh/pareview_temp/shuffle.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     6 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    
    FILE: ...0/site1101/web/vendor/drupal/pareviewsh/pareview_temp/shuffle.module
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     17 | WARNING | Global constants should not be used, move it to a class
        |         | or interface
    --------------------------------------------------------------------------
    
    Time: 1.21 secs; Memory: 6Mb
    
  • 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: ...eview_temp/src/Plugin/Field/FieldFormatter/ShuffleFieldFormatter.php
--------------------------------------------------------------------------
FOUND 47 ERRORS AFFECTING 47 LINES
--------------------------------------------------------------------------
 104 | ERROR | [x] Short array syntax must be used to define arrays
 129 | ERROR | [x] Short array syntax must be used to define arrays
 137 | ERROR | [x] Short array syntax must be used to define arrays
 145 | ERROR | [x] Short array syntax must be used to define arrays
 153 | ERROR | [x] Short array syntax must be used to define arrays
 158 | ERROR | [x] Short array syntax must be used to define arrays
 159 | ERROR | [x] Short array syntax must be used to define arrays
 160 | ERROR | [x] Short array syntax must be used to define arrays
 165 | ERROR | [x] Short array syntax must be used to define arrays
 169 | ERROR | [x] Short array syntax must be used to define arrays
 170 | ERROR | [x] Short array syntax must be used to define arrays
 171 | ERROR | [x] Short array syntax must be used to define arrays
 176 | ERROR | [x] Short array syntax must be used to define arrays
 180 | ERROR | [x] Short array syntax must be used to define arrays
 181 | ERROR | [x] Short array syntax must be used to define arrays
 182 | ERROR | [x] Short array syntax must be used to define arrays
 187 | ERROR | [x] Short array syntax must be used to define arrays
 194 | ERROR | [x] Short array syntax must be used to define arrays
 198 | ERROR | [x] Short array syntax must be used to define arrays
 199 | ERROR | [x] Short array syntax must be used to define arrays
 200 | ERROR | [x] Short array syntax must be used to define arrays
 205 | ERROR | [x] Short array syntax must be used to define arrays
 212 | ERROR | [x] Short array syntax must be used to define arrays
 225 | ERROR | [x] Short array syntax must be used to define arrays
 238 | ERROR | [x] Short array syntax must be used to define arrays
 239 | ERROR | [x] Short array syntax must be used to define arrays
 240 | ERROR | [x] Short array syntax must be used to define arrays
 250 | ERROR | [x] Short array syntax must be used to define arrays
 251 | ERROR | [x] Short array syntax must be used to define arrays
 252 | ERROR | [x] Short array syntax must be used to define arrays
 271 | ERROR | [x] Short array syntax must be used to define arrays
 276 | ERROR | [x] Short array syntax must be used to define arrays
 282 | ERROR | [x] Short array syntax must be used to define arrays
 287 | ERROR | [x] Short array syntax must be used to define arrays
 373 | ERROR | [x] Short array syntax must be used to define arrays
 392 | ERROR | [x] Short array syntax must be used to define arrays
 393 | ERROR | [x] Short array syntax must be used to define arrays
 394 | ERROR | [x] Short array syntax must be used to define arrays
 402 | ERROR | [x] Short array syntax must be used to define arrays
 403 | ERROR | [x] Short array syntax must be used to define arrays
 409 | ERROR | [x] Short array syntax must be used to define arrays
 412 | ERROR | [x] Short array syntax must be used to define arrays
 413 | ERROR | [x] Short array syntax must be used to define arrays
 486 | ERROR | [x] Data types in @param tags need to be fully namespaced
 503 | ERROR | [x] Short array syntax must be used to define arrays
 514 | ERROR | [x] Short array syntax must be used to define arrays
 531 | ERROR | [x] Return type must not contain variable name "$elements"
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 47 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...r/drupal/pareviewsh/pareview_temp/src/Plugin/views/style/Shuffle.php
--------------------------------------------------------------------------
FOUND 29 ERRORS AND 1 WARNING AFFECTING 30 LINES
--------------------------------------------------------------------------
  49 | ERROR   | [x] Expected 1 blank line before function; 2 found
  51 | ERROR   | [x] Short array syntax must be used to define arrays
  52 | ERROR   | [x] Short array syntax must be used to define arrays
  53 | ERROR   | [x] Short array syntax must be used to define arrays
  54 | ERROR   | [x] Short array syntax must be used to define arrays
  55 | ERROR   | [x] Short array syntax must be used to define arrays
  56 | ERROR   | [x] Short array syntax must be used to define arrays
  57 | ERROR   | [x] Short array syntax must be used to define arrays
  58 | ERROR   | [x] Short array syntax must be used to define arrays
  81 | ERROR   | [x] Short array syntax must be used to define arrays
  88 | ERROR   | [x] Short array syntax must be used to define arrays
  95 | ERROR   | [x] Short array syntax must be used to define arrays
 100 | ERROR   | [x] Short array syntax must be used to define arrays
 103 | ERROR   | [x] Short array syntax must be used to define arrays
 108 | ERROR   | [x] Short array syntax must be used to define arrays
 109 | ERROR   | [x] Short array syntax must be used to define arrays
 110 | ERROR   | [x] Short array syntax must be used to define arrays
 115 | ERROR   | [x] Short array syntax must be used to define arrays
 120 | ERROR   | [x] Short array syntax must be used to define arrays
 121 | ERROR   | [x] Short array syntax must be used to define arrays
 122 | ERROR   | [x] Short array syntax must be used to define arrays
 127 | ERROR   | [x] Short array syntax must be used to define arrays
 132 | ERROR   | [x] Short array syntax must be used to define arrays
 133 | ERROR   | [x] Short array syntax must be used to define arrays
 134 | ERROR   | [x] Short array syntax must be used to define arrays
 140 | ERROR   | [x] Short array syntax must be used to define arrays
 146 | ERROR   | [x] Short array syntax must be used to define arrays
 154 | ERROR   | [x] Short array syntax must be used to define arrays
 158 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ]
 161 | ERROR   | [x] Expected 1 blank line after function; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../site1101/web/vendor/drupal/pareviewsh/pareview_temp/shuffle.install
--------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------
 14 | ERROR | [x] Short array syntax must be used to define arrays
 28 | ERROR | [x] Short array syntax must be used to define arrays
 30 | ERROR | [x] Short array syntax must be used to define arrays
 32 | ERROR | [x] Short array syntax must be used to define arrays
 45 | ERROR | [x] Short array syntax must be used to define arrays
 49 | ERROR | [x] Short array syntax must be used to define arrays
 52 | ERROR | [x] Short array syntax must be used to define arrays
 57 | ERROR | [x] Short array syntax must be used to define arrays
 59 | ERROR | [x] Short array syntax must be used to define arrays
 61 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...0/site1101/web/vendor/drupal/pareviewsh/pareview_temp/shuffle.module
--------------------------------------------------------------------------
FOUND 32 ERRORS AFFECTING 32 LINES
--------------------------------------------------------------------------
  42 | ERROR | [x] Short array syntax must be used to define arrays
  46 | ERROR | [x] Short array syntax must be used to define arrays
  51 | ERROR | [x] Short array syntax must be used to define arrays
  52 | ERROR | [x] Short array syntax must be used to define arrays
  56 | ERROR | [x] Short array syntax must be used to define arrays
  57 | ERROR | [x] Short array syntax must be used to define arrays
  58 | ERROR | [x] Short array syntax must be used to define arrays
  59 | ERROR | [x] Short array syntax must be used to define arrays
  64 | ERROR | [x] Short array syntax must be used to define arrays
  65 | ERROR | [x] Short array syntax must be used to define arrays
  66 | ERROR | [x] Short array syntax must be used to define arrays
  74 | ERROR | [x] Short array syntax must be used to define arrays
  78 | ERROR | [x] Short array syntax must be used to define arrays
  84 | ERROR | [x] Short array syntax must be used to define arrays
  85 | ERROR | [x] Short array syntax must be used to define arrays
  88 | ERROR | [x] Short array syntax must be used to define arrays
 102 | ERROR | [x] Expected 1 blank line before function; 0 found
 161 | ERROR | [x] Short array syntax must be used to define arrays
 162 | ERROR | [x] Short array syntax must be used to define arrays
 163 | ERROR | [x] Short array syntax must be used to define arrays
 188 | ERROR | [x] Expected 1 blank line after function; 2 found
 208 | ERROR | [x] Expected 1 blank line after function; 2 found
 283 | ERROR | [x] Short array syntax must be used to define arrays
 302 | ERROR | [x] Short array syntax must be used to define arrays
 323 | ERROR | [x] Short array syntax must be used to define arrays
 324 | ERROR | [x] Short array syntax must be used to define arrays
 325 | ERROR | [x] Short array syntax must be used to define arrays
 333 | ERROR | [x] Short array syntax must be used to define arrays
 334 | ERROR | [x] Short array syntax must be used to define arrays
 340 | ERROR | [x] Short array syntax must be used to define arrays
 343 | ERROR | [x] Short array syntax must be used to define arrays
 344 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 32 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 2.17 secs; Memory: 8Mb