Fix errors flagged by phpcs

Created on 21 November 2023, about 1 year ago
Updated 21 December 2023, 11 months ago

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/eat.links.menu.yml
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/README.md
------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------
56 | WARNING | Line exceeds 80 characters; contains 85 characters
------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/eat.routing.yml
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/eat.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 50 ERRORS AND 8 WARNINGS AFFECTING 47 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
7 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\taxonomy\Entity\Term.
12 | WARNING | [x] Unused use statement
13 | WARNING | [x] Unused use statement
26 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
58 | WARNING | [x] '@todo: Add check for all entity types.' should match the format '@todo Fix problem X here.'
123 | ERROR | [ ] Missing short description in doc comment
124 | ERROR | [ ] The text '@deprecated - use Eat::loadTid. Load entity tid.' does not match the standard format: @deprecated in %deprecation-version% and is removed from %removal-version%.
| | %extra-info%.
124 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately following it
128 | ERROR | [ ] Missing parameter comment
128 | ERROR | [ ] Missing parameter type
130 | ERROR | [ ] Description for the @return value is missing
140 | ERROR | [ ] Missing short description in doc comment
141 | ERROR | [ ] The text '@deprecated - use Eat::addTerm(). eat_add_term' does not match the standard format: @deprecated in %deprecation-version% and is removed from %removal-version%.
| | %extra-info%.
141 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately following it
145 | ERROR | [ ] Missing parameter comment
145 | ERROR | [ ] Missing parameter type
146 | ERROR | [ ] Missing parameter comment
146 | ERROR | [ ] Missing parameter type
147 | ERROR | [ ] Missing parameter type
147 | ERROR | [x] Parameter comment must be on the next line
151 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
162 | WARNING | [x] A comma should follow the last multiline array item. Found: $vocabulary
169 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
170 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
171 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
171 | ERROR | [x] Expected 1 space after SWITCH keyword; 0 found
172 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
173 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
174 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
175 | ERROR | [x] Case breaking statements must be followed by a single blank line
175 | ERROR | [x] Case breaking statement indented incorrectly; expected 10 spaces, found 12
176 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
177 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
178 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
179 | ERROR | [x] Case breaking statements must be followed by a single blank line
179 | ERROR | [x] Case breaking statement indented incorrectly; expected 10 spaces, found 12
180 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
181 | ERROR | [x] Case breaking statement indented incorrectly; expected 10 spaces, found 12
182 | WARNING | [ ] Code after the RETURN statement on line 181 cannot be executed
182 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 12
183 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
184 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
186 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
187 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 8
192 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
193 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
194 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
196 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
197 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
198 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 8
200 | WARNING | [x] '@todo: Add non deprecated delete.' should match the format '@todo Fix problem X here.'
200 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
201 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
204 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 6
218 | ERROR | [x] Expected 1 newline at end of file; 3 found
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 43 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/src/Form/BatchImport.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
27 | WARNING | [x] A comma should follow the last multiline array item. Found: )
37 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
40 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/src/Form/EatAdminSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 9 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityType.
11 | ERROR | [x] Missing class doc comment
31 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
35 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
59 | ERROR | [x] Concat operator must be surrounded by a single space
59 | ERROR | [x] Concat operator must be surrounded by a single space
66 | WARNING | [x] A comma should follow the last multiline array item. Found: $v
69 | WARNING | [ ] Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
80 | ERROR | [x] Concat operator must be surrounded by a single space
80 | ERROR | [x] Concat operator must be surrounded by a single space
80 | ERROR | [x] Concat operator must be surrounded by a single space
92 | ERROR | [x] Concat operator must be surrounded by a single space
92 | ERROR | [x] Concat operator must be surrounded by a single space
92 | ERROR | [x] Concat operator must be surrounded by a single space
109 | WARNING | [x] A comma should follow the last multiline array item. Found: )
120 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
135 | WARNING | [x] A comma should follow the last multiline array item. Found: $terms
139 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
141 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/src/Eat.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 41 ERRORS AND 9 WARNINGS AFFECTING 35 LINES
-------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Doc comment short description must be on the first line
22 | ERROR | [ ] Parameter tags must be defined first in a doc comment
22 | ERROR | [ ] Missing parameter comment
22 | ERROR | [ ] Missing parameter type
23 | ERROR | [ ] Missing parameter comment
23 | ERROR | [ ] Missing parameter type
24 | ERROR | [ ] Missing parameter comment
24 | ERROR | [ ] Missing parameter type
26 | ERROR | [ ] Description for the @return value is missing
27 | ERROR | [x] Separate the @return and @throws sections by a blank line.
30 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
41 | WARNING | [x] A comma should follow the last multiline array item. Found: $vocabulary
51 | ERROR | [ ] Parameter tags must be defined first in a doc comment
51 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] Missing parameter type
53 | ERROR | [ ] Description for the @return value is missing
66 | ERROR | [ ] Description for the @return value is missing
78 | ERROR | [ ] Description for the @return value is missing
98 | ERROR | [ ] Description for the @return value is missing
111 | ERROR | [ ] Missing parameter comment
111 | ERROR | [ ] Missing parameter type
113 | ERROR | [ ] Description for the @return value is missing
118 | WARNING | [ ] Unused variable $k.
128 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
133 | WARNING | [x] '@todo: make usable with multiple entity types.' should match the format '@todo Fix problem X here.'
134 | WARNING | [ ] Unused variable $key.
144 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
164 | WARNING | [x] '@todo: give better names for variables.' should match the format '@todo Fix problem X here.'
165 | WARNING | [ ] Unused variable $k.
166 | WARNING | [ ] Unused variable $vocab_name.
179 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
180 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
181 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
181 | ERROR | [ ] Missing parameter comment
181 | ERROR | [ ] Missing parameter type
182 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
182 | ERROR | [ ] Missing parameter comment
182 | ERROR | [ ] Missing parameter type
183 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
183 | ERROR | [ ] Missing parameter comment
183 | ERROR | [ ] Missing parameter type
184 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
184 | ERROR | [x] Separate the @param and @throws sections by a blank line.
185 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
194 | ERROR | [ ] Missing parameter type
197 | ERROR | [ ] Return type missing for @return tag in function comment
198 | ERROR | [x] Return comment indentation must be 3 spaces, found 1 spaces
212 | ERROR | [ ] Missing parameter comment
212 | ERROR | [ ] Missing parameter type
214 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/src/Plugin/views/argument_default/EatFilters.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\node\NodeInterface.
12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
16 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
82 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
84 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
92 | ERROR | [x] Concat operator must be surrounded by a single space
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/web/modules/contrib/first_assign_vira/eat.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

Time: 148ms; Memory: 10MB

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇲🇼Malawi chancenyasulu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chancenyasulu
  • First commit to issue fork.
  • Merge request !2Fixed phpcs issues → (Open) created by Neha-Verma
  • Status changed to Needs review 11 months ago
  • 🇮🇳India Neha-Verma

    Some errors still needs to be fixed.

    FILE: /opt/lampp/htdocs/camp/web/modules/contrib/first_assign/eat.module
    -----------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------
     127 | ERROR   | The text '@deprecated - use Eat::loadTid. Load entity tid.' does not match
         |         | the standard format: @deprecated in %deprecation-version% and is removed from
         |         | %removal-version%. %extra-info%.
     127 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
     153 | ERROR   | The text '@deprecated -  use Eat::addTerm(). eat_add_term' does not match the
         |         | standard format: @deprecated in %deprecation-version% and is removed from
         |         | %removal-version%. %extra-info%.
     153 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
     193 | WARNING | Code after the RETURN statement on line 192 cannot be executed
    -----------------------------------------------------------------------------------------------
    
    
    FILE: /opt/lampp/htdocs/camp/web/modules/contrib/first_assign/src/Form/EatAdminSettingsForm.php
    -----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    -----------------------------------------------------------------------------------------------
      33 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      52 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      71 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency
         |         | injection instead
     142 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------
    
Production build 0.71.5 2024