Fix the errors/warnings reported by PHP_CodeSniffer

Created on 7 March 2024, 4 months ago
Updated 8 March 2024, 4 months ago

Problem/Motivation

When running the module code against Drupal coding standards based on Drupal standard, the module shows errors

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,yml modules/contrib/ownid/

Report:

FILE: /home/contribution/drupal/web/modules/contrib/ownid/ownid.routing.yml
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
  7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 15 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 23 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 31 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 39 | 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.
 47 | 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.
------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/contribution/drupal/web/modules/contrib/ownid/src/Controller/OwnidController.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 166 ERRORS AND 8 WARNINGS AFFECTING 134 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
   8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\HttpFoundation\JsonResponse.
  14 | ERROR   | [x] Missing class doc comment
  15 | ERROR   | [x] Opening brace should be on the same line as the declaration
  16 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  16 | ERROR   | [x] Missing function doc comment
  16 | ERROR   | [ ] Public method name "OwnidController::setOwnIDDataByLoginId" is not in lowerCamel format
  16 | ERROR   | [x] Expected 1 blank line before function; 0 found
  17 | ERROR   | [x] Opening brace should be on the same line as the declaration
  18 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  20 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  21 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  22 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  24 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  25 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  27 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  28 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  30 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  31 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  31 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  33 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  34 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  35 | ERROR   | [x] Object operator not indented correctly; expected 18 spaces but found 20
  41 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  45 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  47 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  48 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  48 | ERROR   | [x] Expected newline after closing brace
  49 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  50 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  51 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  52 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  52 | ERROR   | [x] Expected newline after closing brace
  53 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  54 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  56 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  57 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  57 | ERROR   | [x] Expected 1 blank line after function; 2 found
  60 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  60 | ERROR   | [x] Missing function doc comment
  60 | ERROR   | [ ] Public method name "OwnidController::getOwnIDDataByLoginId" is not in lowerCamel format
  61 | ERROR   | [x] Opening brace should be on the same line as the declaration
  62 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  64 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  65 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  66 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  68 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  69 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  71 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  73 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  74 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  74 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  76 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  77 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  78 | ERROR   | [x] Object operator not indented correctly; expected 18 spaces but found 20
  84 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  85 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  85 | ERROR   | [x] Expected newline after closing brace
  86 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  87 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 16
  88 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  89 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  89 | ERROR   | [x] Expected newline after closing brace
  90 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
  91 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  93 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  94 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  96 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  96 | ERROR   | [x] Missing function doc comment
  97 | ERROR   | [x] Opening brace should be on the same line as the declaration
  98 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 100 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 101 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 102 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 104 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 105 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 107 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 109 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 110 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 110 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 112 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 113 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 115 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 116 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 118 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 118 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 120 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 122 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 124 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 125 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 125 | ERROR   | [x] Expected newline after closing brace
 126 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 127 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 129 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 130 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 132 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 132 | ERROR   | [x] Missing function doc comment
 133 | ERROR   | [x] Opening brace should be on the same line as the declaration
 134 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 134 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 135 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 136 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 138 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 139 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 140 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 141 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 143 | WARNING | [ ] Line exceeds 80 characters; contains 106 characters
 143 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 143 | ERROR   | [x] Inline comments must start with a capital letter
 143 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 144 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 145 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 147 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 147 | ERROR   | [x] Inline comments must start with a capital letter
 147 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 148 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 149 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 150 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 150 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 151 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 151 | ERROR   | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
 153 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 153 | ERROR   | [x] No space found before comment text; expected "// If the JWT verification is correct" but found "//If the JWT verification
     |         |     is correct"
 153 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 154 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 155 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 156 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 156 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 158 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 160 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 165 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 165 | ERROR   | [x] Expected newline after closing brace
 166 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 167 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 168 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 170 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 171 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 173 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 173 | ERROR   | [x] Missing function doc comment
 173 | ERROR   | [x] Visibility must be declared on method "onUserRegister"
 174 | ERROR   | [x] Opening brace should be on the same line as the declaration
 175 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 176 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 12
 178 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 180 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 180 | ERROR   | [x] Missing function doc comment
 181 | ERROR   | [x] Opening brace should be on the same line as the declaration
 182 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 184 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 184 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 185 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 12
 187 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 188 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 190 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 190 | ERROR   | [x] Missing function doc comment
 191 | ERROR   | [x] Opening brace should be on the same line as the declaration
 192 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 192 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 192 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 193 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 194 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 196 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 197 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 199 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 199 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 200 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 202 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 204 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 204 | ERROR   | [x] Concat operator must be surrounded by a single space
 204 | ERROR   | [x] Concat operator must be surrounded by a single space
 206 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 208 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 210 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 211 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 211 | ERROR   | [x] Expected 1 blank line after function; 0 found
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 164 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/contribution/drupal/web/modules/contrib/ownid/src/Form/OwnidSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 172 ERRORS AND 7 WARNINGS AFFECTING 82 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
   5 | ERROR   | [x] Doc comment short description must end with a full stop
  14 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  14 | ERROR   | [x] Function comment short description must start with exactly one space
  14 | ERROR   | [x] Doc comment short description must end with a full stop
  15 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  15 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
  16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
  18 | ERROR   | [x] Opening brace should be on the same line as the declaration
  20 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  20 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  21 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  21 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  21 | ERROR   | [x] Function comment short description must start with exactly one space
  22 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  23 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  23 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  24 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  24 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  24 | ERROR   | [x] Opening brace should be on the same line as the declaration
  25 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  25 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  26 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  26 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  28 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  28 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  29 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  29 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  29 | ERROR   | [x] Function comment short description must start with exactly one space
  30 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  31 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  31 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  32 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  32 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  32 | ERROR   | [x] Opening brace should be on the same line as the declaration
  33 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  33 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  34 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  34 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  36 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  36 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  37 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  37 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  37 | ERROR   | [x] Function comment short description must start with exactly one space
  38 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  39 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  39 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  40 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  40 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  40 | ERROR   | [x] Opening brace should be on the same line as the declaration
  41 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  41 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  43 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  43 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  43 | ERROR   | [x] Short array syntax must be used to define arrays
  44 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  44 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  45 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  45 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  46 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  46 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  47 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  47 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  48 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  48 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  48 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  49 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  50 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  50 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  50 | ERROR   | [x] Short array syntax must be used to define arrays
  51 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  51 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  52 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  52 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  53 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  53 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  54 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  54 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  54 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  55 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  57 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  57 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  57 | ERROR   | [x] Short array syntax must be used to define arrays
  58 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  58 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  58 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  59 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  59 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  59 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  60 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  60 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  60 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  61 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  63 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  63 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  63 | ERROR   | [x] Short array syntax must be used to define arrays
  64 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  64 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  64 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  65 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  65 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  65 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  66 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  66 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  66 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  67 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  69 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  69 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  69 | ERROR   | [x] Short array syntax must be used to define arrays
  70 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  70 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  70 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  71 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  71 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  71 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  72 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  72 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  72 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  73 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  73 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces, found 3
  73 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
  73 | ERROR   | [x] Short array syntax must be used to define arrays
  74 | ERROR   | [x] Array indentation error, expected 5 spaces but found 16
  74 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  75 | ERROR   | [x] Array indentation error, expected 5 spaces but found 16
  75 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  76 | ERROR   | [x] Array closing indentation error, expected 3 spaces but found 12
  77 | ERROR   | [x] Array indentation error, expected 4 spaces but found 12
  77 | ERROR   | [x] Short array syntax must be used to define arrays
  78 | ERROR   | [x] Array indentation error, expected 14 spaces but found 16
  78 | ERROR   | [x] Short array syntax must be used to define arrays
  79 | ERROR   | [x] Array indentation error, expected 18 spaces but found 20
  80 | ERROR   | [x] Array closing indentation error, expected 16 spaces but found 17
  82 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  84 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  84 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
  85 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  85 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  87 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  87 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  88 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  88 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  88 | ERROR   | [x] Function comment short description must start with exactly one space
  89 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  90 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  90 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  91 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  91 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  91 | ERROR   | [x] Opening brace should be on the same line as the declaration
  92 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  92 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  94 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  94 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  95 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  95 | ERROR   | [x] Spaces must be used for alignment; tabs are not allowed
  95 | ERROR   | [x] Function comment short description must start with exactly one space
  96 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  97 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  97 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  98 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  98 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
  98 | ERROR   | [x] Opening brace should be on the same line as the declaration
  99 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  99 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 100 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 100 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
 100 | ERROR   | [x] Object operator not indented correctly; expected 4 spaces but found 3
 101 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 101 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
 102 | ERROR   | [x] Object operator not indented correctly; expected 3 spaces but found 12
 107 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 107 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 109 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 109 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 109 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 109 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 110 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 110 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
 110 | ERROR   | [x] Expected 1 blank line after function; 0 found
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 174 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/contribution/drupal/web/modules/contrib/ownid/ownid.install
------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  3 | ERROR | [ ] Missing short description in doc comment
  5 | ERROR | [x] Return comment indentation must be 3 spaces, found 1 spaces
  8 | ERROR | [x] Whitespace found at end of line
  9 | ERROR | [x] Whitespace found at end of line
 10 | ERROR | [x] Whitespace found at end of line
 16 | ERROR | [x] Whitespace found at end of line
 34 | ERROR | [ ] Missing short description in doc comment
 36 | ERROR | [x] Return comment indentation must be 3 spaces, found 1 spaces
 38 | ERROR | [x] Expected 1 space before opening brace; found 0
 39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 40 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: /home/contribution/drupal/web/modules/contrib/ownid/ownid.links.menu.yml
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------


FILE: /home/contribution/drupal/web/modules/contrib/ownid/ownid.module
---------------------------------------------------------------------------------------------------
FOUND 75 ERRORS AND 1 WARNING AFFECTING 69 LINES
---------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] Missing file doc comment
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
   6 | ERROR   | [ ] Missing short description in doc comment
   8 | ERROR   | [x] Return comment indentation must be 3 spaces, found 1 spaces
  11 | ERROR   | [x] Opening brace should be on the same line as the declaration
  12 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  14 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  15 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  16 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  17 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  18 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  19 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  20 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  22 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  22 | ERROR   | [x] Short array syntax must be used to define arrays
  23 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
  24 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
  24 | ERROR   | [x] Short array syntax must be used to define arrays
  25 | ERROR   | [x] Short array syntax must be used to define arrays
  25 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  29 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  36 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  37 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
  39 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  41 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  42 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  43 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  45 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  50 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  52 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  53 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  54 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  55 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  57 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  62 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  64 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  65 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  65 | ERROR   | [x] Short array syntax must be used to define arrays
  66 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
  67 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
  68 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
  68 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
  70 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  73 | ERROR   | [x] Missing function doc comment
  74 | ERROR   | [x] Opening brace should be on the same line as the declaration
  75 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  76 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  77 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  79 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  82 | ERROR   | [x] Missing function doc comment
  83 | ERROR   | [x] Opening brace should be on the same line as the declaration
  84 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  85 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
  86 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  88 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  91 | ERROR   | [ ] Missing short description in doc comment
  93 | ERROR   | [x] Return comment indentation must be 3 spaces, found 1 spaces
  96 | ERROR   | [x] Opening brace should be on the same line as the declaration
  97 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  98 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
  99 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 100 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 101 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 102 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 103 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 104 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 105 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 107 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 114 | ERROR   | [x] Concat operator must be surrounded by a single space
 127 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 129 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
 130 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
 130 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 131 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
 133 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 74 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇮🇳India realsp

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024