FILE: D:\xampp\htdocs\drupal9.5\web\modules\contrib\five_star_rating\src\Form\RatingForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
29 | WARNING | Unused variable $rating_text.
60 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal9.5\web\modules\contrib\five_star_rating\src\Plugin\Field\FieldFormatter\RatingFormatter.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
37 | WARNING | Unused variable $elements.
108 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal9.5\web\modules\contrib\five_star_rating\src\Utility\Utility.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------
86 | WARNING | Unused variable $result.
95 | WARNING | Unused variable $result.
--------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | phpcs-standard-coding-issue-3296182-2.patch | 3.48 KB | Harsh panchal |
Comments
Comment #2
Harsh panchal commentedI have fixed phpcs standard issue and providing a patch.
Comment #3
shamir.vs commentedPatch #2 applied successfully, but still, there are a few errors
FILE: ...app/web/modules/contrib/five_star_rating/src/Form/RatingForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
15 | ERROR | [x] Whitespace found at end of line
20 | ERROR | [x] Expected 1 blank line before function; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ..._star_rating/src/Plugin/Field/FieldFormatter/RatingFormatter.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] There must be one blank line after the last USE
| | statement; 0 found;
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...les/contrib/five_star_rating/src/Controller/RatingController.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
18 | ERROR | The $_POST super global must not be accessed directly;
| | inject the request_stack service and use
| | $stack->getCurrentRequest()->request->get('uid')
| | instead
19 | ERROR | The $_POST super global must not be accessed directly;
| | inject the request_stack service and use
| | $stack->getCurrentRequest()->request->get('nid')
| | instead
20 | ERROR | The $_POST super global must not be accessed directly;
| | inject the request_stack service and use
| | $stack->getCurrentRequest()->request->get('rating')
| | instead
----------------------------------------------------------------------
FILE: ...app/web/modules/contrib/five_star_rating/src/Utility/Utility.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
86 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 5
87 | ERROR | [x] Object operator not indented correctly; expected 7
| | spaces but found 8
95 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 5
96 | ERROR | [x] Object operator not indented correctly; expected 7
| | spaces but found 8
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Comment #5
irodriguez commentedThis is fixed now.
Comment #6
irodriguez commentedComment #7
irodriguez commented