https://git.drupal.org/project/local_translation.git

Primary tabs

Review of the 8.x-1.x branch (commit f413ca6):
  • Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
  • The local_translation_content.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
  • 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/modules/local_translation_interface/js/local_translation_interface.js: line 5, col 2, Error - Use the function form of 'use strict'. (strict)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/modules/local_translation_interface/js/local_translation_interface.js: line 95, col 11, Error - Split 'var' declarations into multiple statements. (one-var)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/modules/local_translation_interface/js/local_translation_interface.js: line 106, col 31, Error - Multiple spaces found before '='. (no-multi-spaces)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/modules/local_translation_interface/js/local_translation_interface.js: line 107, col 31, Error - Multiple spaces found before '='. (no-multi-spaces)
    
    4 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...pareviewsh/pareview_temp/src/Services/LocalTranslationUserSkills.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
      69 | WARNING | User::load calls should be avoided in classes, use
         |         | dependency injection instead
      88 | WARNING | User::load calls should be avoided in classes, use
         |         | dependency injection instead
     113 | WARNING | User::load calls should be avoided in classes, use
         |         | dependency injection instead
     201 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...vendor/drupal/pareviewsh/pareview_temp/local_translation.routing.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     7 | WARNING | The administration page callback should probably use
       |         | "administer site configuration" - which implies the user
       |         | can change something - rather than "access administration
       |         | pages" which is about viewing but not changing
       |         | configurations.
    --------------------------------------------------------------------------
    
    Time: 5.53 secs; Memory: 10Mb
    
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES
--------------------------------------------------------------------------
  6 | WARNING | Line exceeds 80 characters; contains 491 characters
 12 | WARNING | Line exceeds 80 characters; contains 89 characters
 13 | WARNING | Line exceeds 80 characters; contains 85 characters
 14 | WARNING | Line exceeds 80 characters; contains 91 characters
 15 | WARNING | Line exceeds 80 characters; contains 232 characters
 16 | WARNING | Line exceeds 80 characters; contains 137 characters
 20 | WARNING | Line exceeds 80 characters; contains 103 characters
 21 | WARNING | Line exceeds 80 characters; contains 103 characters
 39 | WARNING | Line exceeds 80 characters; contains 213 characters
 42 | WARNING | Line exceeds 80 characters; contains 227 characters
 45 | WARNING | Line exceeds 80 characters; contains 158 characters
--------------------------------------------------------------------------


FILE: .../local_translation_content/src/LocalTranslationContentTestsTrait.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
  99 | WARNING | Line exceeds 80 characters; contains 91 characters
 115 | WARNING | Line exceeds 80 characters; contains 92 characters
--------------------------------------------------------------------------


FILE: ...content/src/Plugin/views/filter/LocalTranslationViewsFiltersBase.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 81 | ERROR | [x] Equals sign not aligned with surrounding assignments;
    |       |     expected 1 space but found 2 spaces
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...slation_content/src/Controller/LocalTranslationContentController.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
  67 | ERROR | [x] Equals sign not aligned with surrounding assignments;
     |       |     expected 4 spaces but found 12 spaces
  68 | ERROR | [x] Equals sign not aligned with surrounding assignments;
     |       |     expected 1 space but found 9 spaces
 520 | ERROR | [x] Equals sign not aligned with surrounding assignments;
     |       |     expected 1 space but found 2 spaces
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...n_content/tests/src/Functional/LocalTranslationContentConfigTest.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 116 | ERROR | [x] Expected 1 blank line after function; 0 found
 117 | ERROR | [x] The closing brace for the class must have an empty
     |       |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...p/modules/local_translation_content/local_translation_content.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 161 | ERROR | [x] Namespaced classes/interfaces/traits should be
     |       |     referenced with use statements
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...p/modules/local_translation_interface/src/Form/TranslateEditForm.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
 44 | ERROR | [x] Equals sign not aligned with surrounding assignments;
    |       |     expected 1 space but found 3 spaces
 45 | ERROR | [x] Equals sign not aligned with surrounding assignments;
    |       |     expected 3 spaces but found 5 spaces
 78 | ERROR | [ ] Type hint "array" missing for $filter_values
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...l/pareviewsh/pareview_temp/src/Form/LocalTranslationSettingsForm.php
--------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
 117 | ERROR | [x] Array indentation error, expected 8 spaces but found 7
 118 | ERROR | [x] Array indentation error, expected 9 spaces but found
     |       |     10
 123 | ERROR | [x] Array closing indentation error, expected 7 spaces but
     |       |     found 8
 162 | ERROR | [x] Equals sign not aligned with surrounding assignments;
     |       |     expected 1 space but found 2 spaces
 163 | ERROR | [x] Equals sign not aligned with surrounding assignments;
     |       |     expected 1 space but found 2 spaces
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 8.79 secs; Memory: 12Mb