Problem/Motivation

The module must follow the correct Drupal coding standards. So, when developing it, make sure to run phpcs --standard=Drupal,DrupalPractice on the project. This will fix most issues that reviewers might find.

Steps to reproduce

Run the following command:

  • phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml {module_path e.g /web/custom/azure.}
FILE: ...ite_name/web/modules/contrib/azure_oauth_sso/azure_oauth_sso.libraries.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 23 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


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


FILE: ..._site_name/web/modules/contrib/azure_oauth_sso/azure_oauth_sso.routing.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 39 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: .../my_site_name/web/modules/contrib/azure_oauth_sso/azure_oauth_sso.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
--------------------------------------------------------------------------------


FILE: ...on/my_site_name/web/modules/contrib/azure_oauth_sso/azure_oauth_sso.module
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  8 | ERROR | [x] Missing function doc comment
 12 | ERROR | [x] Missing function doc comment
 12 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
    |       |     with use statements
 36 | ERROR | [x] Missing function doc comment
 49 | ERROR | [x] Missing function doc comment
 66 | ERROR | [x] Missing function doc comment
 74 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...ame/web/modules/contrib/azure_oauth_sso/src/Form/OauthRolesMappingForm.php
--------------------------------------------------------------------------------
FOUND 95 ERRORS AFFECTING 82 LINES
--------------------------------------------------------------------------------
   8 | ERROR | [ ] Class name doesn't match filename; expected "class
     |       |     OauthRolesMappingForm"
   8 | ERROR | [ ] Class name must begin with a capital letter
   8 | ERROR | [x] Missing class doc comment
   9 | ERROR | [x] Opening brace should be on the same line as the declaration
  11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  11 | ERROR | [x] Missing function doc comment
  12 | ERROR | [x] Opening brace should be on the same line as the declaration
  13 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  16 | ERROR | [x] Missing function doc comment
  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
  19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  21 | ERROR | [x] Missing function doc comment
  22 | ERROR | [x] Opening brace should be on the same line as the declaration
  23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
  27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  28 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  29 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
  30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  32 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  33 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  34 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  35 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  36 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  37 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  37 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
  38 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  42 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  43 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  44 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  45 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  46 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  47 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  49 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  49 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but
     |       |     found "null"
  50 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  53 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  54 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  55 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  56 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  57 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  59 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  60 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  61 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  62 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  62 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
  67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  68 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
  69 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  70 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  71 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  71 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
  74 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  75 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  76 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  77 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  78 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  79 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  83 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  84 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  85 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  86 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  87 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  88 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  95 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  95 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
  96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  98 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  99 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 100 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
 104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 107 | ERROR | [x] Missing function doc comment
 108 | ERROR | [x] Opening brace should be on the same line as the declaration
 109 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 111 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 113 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 115 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 117 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 118 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
 119 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
 120 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
 121 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 123 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 124 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 124 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 93 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...me/web/modules/contrib/azure_oauth_sso/src/Form/OauthFieldsMappingForm.php
--------------------------------------------------------------------------------
FOUND 162 ERRORS AFFECTING 148 LINES
--------------------------------------------------------------------------------
   8 | ERROR | [ ] Class name doesn't match filename; expected "class
     |       |     OauthFieldsMappingForm"
   8 | ERROR | [ ] Class name must begin with a capital letter
   8 | ERROR | [x] Missing class doc comment
   9 | ERROR | [x] Opening brace should be on the same line as the declaration
  11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  11 | ERROR | [x] Missing function doc comment
  12 | ERROR | [x] Opening brace should be on the same line as the declaration
  13 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  16 | ERROR | [x] Missing function doc comment
  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
  19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  21 | ERROR | [x] Missing function doc comment
  22 | ERROR | [x] Opening brace should be on the same line as the declaration
  23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  29 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  30 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
  30 | ERROR | [ ] The array declaration extends to column 395 (the limit is
     |       |     80). The array content should be split up over multiple
     |       |     lines
  31 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
  32 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
  33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  36 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  37 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  38 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  39 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  40 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  42 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
  45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
  46 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
  47 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  48 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  49 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  50 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  51 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  52 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  56 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
  57 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
  58 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  59 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
  60 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  61 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  62 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  63 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  64 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  65 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  66 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  67 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  68 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  69 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  70 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  71 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  72 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  73 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  74 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  75 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  76 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  77 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  78 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  79 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  80 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  81 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  82 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  83 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  84 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  85 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  86 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  87 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  88 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  89 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  90 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  91 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  92 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  93 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  94 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  95 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  96 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  97 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  98 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
  99 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 100 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 101 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 102 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 103 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 104 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 105 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 106 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 107 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 108 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 109 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 110 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 111 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 112 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 113 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 114 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 115 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 116 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 117 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 118 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 119 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 120 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 121 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 122 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 123 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 124 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 125 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 126 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 127 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 128 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 129 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 130 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 131 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 132 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 133 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 134 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 135 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 137 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
 137 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but
     |       |     found "null"
 138 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
 139 | ERROR | [x] Array indentation error, expected 26 spaces but found 28
 139 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but
     |       |     found "null"
 144 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 146 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 147 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 148 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 149 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 149 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
 150 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
 151 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 151 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but
     |       |     found "null"
 154 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 154 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
     |       |     found "true"
 155 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 157 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 158 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 159 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
 163 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 164 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 166 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 166 | ERROR | [x] Missing function doc comment
 167 | ERROR | [x] Opening brace should be on the same line as the declaration
 168 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 169 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 171 | 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] Line indented incorrectly; expected 8 spaces, found 16
 176 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
 177 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 179 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 180 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 182 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 184 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
 185 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 185 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 159 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...site_name/web/modules/contrib/azure_oauth_sso/src/Form/OauthConfigForm.php
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
  10 | ERROR | [x] Missing class doc comment
  13 | ERROR | [x] Missing function doc comment
  15 | ERROR | [x] Expected 1 blank line after function; 0 found
  16 | ERROR | [x] Missing function doc comment
  20 | ERROR | [x] Missing function doc comment
 133 | ERROR | [x] Missing function doc comment
 150 | ERROR | [x] Expected 1 blank line after function; 0 found
 151 | ERROR | [x] The closing brace for the class must have an empty line
     |       |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...ite_name/web/modules/contrib/azure_oauth_sso/src/Controller/OauthLogin.php
--------------------------------------------------------------------------------
FOUND 22 ERRORS AFFECTING 22 LINES
--------------------------------------------------------------------------------
  15 | ERROR | [x] Missing class doc comment
  17 | ERROR | [ ] Missing member variable doc comment
  18 | ERROR | [ ] Missing member variable doc comment
  19 | ERROR | [ ] Missing member variable doc comment
  20 | ERROR | [ ] Missing member variable doc comment
  21 | ERROR | [ ] Missing member variable doc comment
  22 | ERROR | [ ] Missing member variable doc comment
  23 | ERROR | [ ] Missing member variable doc comment
  25 | ERROR | [x] Missing function doc comment
  30 | ERROR | [x] Missing function doc comment
  67 | ERROR | [x] Missing function doc comment
  79 | ERROR | [x] Missing function doc comment
 109 | ERROR | [x] Missing function doc comment
 203 | ERROR | [x] Missing function doc comment
 208 | ERROR | [x] Space before opening parenthesis of function call prohibited
 232 | ERROR | [x] Missing function doc comment
 252 | ERROR | [x] Missing function doc comment
 298 | ERROR | [x] Missing function doc comment
 310 | ERROR | [x] Missing function doc comment
 334 | ERROR | [x] Missing function doc comment
 363 | ERROR | [x] Expected 1 blank line after function; 0 found
 364 | ERROR | [x] The closing brace for the class must have an empty line
     |       |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...name/web/modules/contrib/azure_oauth_sso/src/Service/OAuthTokenService.php
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------
 10 | ERROR | [x] Missing class doc comment
 14 | ERROR | [x] Missing function doc comment
 19 | ERROR | [x] Missing function doc comment
 44 | ERROR | [x] Missing function doc comment
 68 | ERROR | [x] Expected 1 blank line after function; 0 found
 69 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...ibution/my_site_name/web/modules/contrib/azure_oauth_sso/src/BaseOAuth.php
--------------------------------------------------------------------------------
FOUND 18 ERRORS AFFECTING 14 LINES
--------------------------------------------------------------------------------
  5 | ERROR | [x] Missing trait doc comment
  6 | ERROR | [ ] Missing member variable doc comment
  7 | ERROR | [ ] Missing member variable doc comment
  8 | ERROR | [ ] Missing member variable doc comment
  9 | ERROR | [ ] Class property $client_id should use lowerCamel naming
    |       |     without underscores
  9 | ERROR | [ ] Missing member variable doc comment
 10 | ERROR | [ ] Class property $ad_tenant should use lowerCamel naming
    |       |     without underscores
 10 | ERROR | [ ] Missing member variable doc comment
 11 | ERROR | [ ] Class property $client_secret should use lowerCamel naming
    |       |     without underscores
 11 | ERROR | [ ] Missing member variable doc comment
 12 | ERROR | [ ] Class property $redirect_uri should use lowerCamel naming
    |       |     without underscores
 12 | ERROR | [ ] Missing member variable doc comment
 14 | ERROR | [x] Missing function doc comment
 19 | ERROR | [x] Missing function doc comment
 24 | ERROR | [x] Missing function doc comment
 29 | ERROR | [x] Missing function doc comment
 34 | ERROR | [x] Expected 1 blank line after function; 0 found
 35 | ERROR | [x] The closing brace for the trait must have an empty line

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sunil_lnwebworks created an issue. See original summary.

richa_porwal’s picture

Assigned: Unassigned » richa_porwal
richa_porwal’s picture

Assigned: richa_porwal » Unassigned

viren18febS made their first commit to this issue’s fork.

viren18febS’s picture

I have added a patch with fixes.

  • 2a95315c committed on 1.0.x
    Issue #3427782 by viren18febS, sunil_lnwebworks: Module have some PHPCS...
ahmadhalah’s picture

Committed on the development branch

ahmadhalah’s picture

Status: Active » Fixed
vishal.kadam’s picture

Version: 1.0.0 » 1.0.x-dev
Priority: Minor » Normal
Status: Fixed » Needs work

Still there are lot of phpcss issues.

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml azure_oauth_ss
o/

FILE: azure_oauth_sso/azure_oauth_sso.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/BaseOAuth.php
--------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------------
  5 | ERROR | Doc comment is empty
  9 | ERROR | Missing member variable doc comment
 10 | ERROR | Missing member variable doc comment
 11 | ERROR | Missing member variable doc comment
 12 | ERROR | Missing member variable doc comment
 12 | ERROR | Class property $client_id should use lowerCamel naming without underscores
 13 | ERROR | Missing member variable doc comment
 13 | ERROR | Class property $ad_tenant should use lowerCamel naming without underscores
 14 | ERROR | Missing member variable doc comment
 14 | ERROR | Class property $client_secret should use lowerCamel naming without underscores
 15 | ERROR | Missing member variable doc comment
 15 | ERROR | Class property $redirect_uri should use lowerCamel naming without underscores
 17 | ERROR | Doc comment is empty
 25 | ERROR | Doc comment is empty
 33 | ERROR | Doc comment is empty
 41 | ERROR | Doc comment is empty
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/Form/OauthConfigForm.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 8 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------------
  10 | ERROR   | Doc comment is empty
  16 | ERROR   | Doc comment is empty
  23 | ERROR   | Doc comment is empty
  30 | ERROR   | Doc comment is empty
  78 | WARNING | #options values usually have to run through t() for translation
  79 | WARNING | #options values usually have to run through t() for translation
  85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 111 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 112 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 122 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 134 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 146 | ERROR   | Doc comment is empty
 150 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/Form/OauthFieldsMappingForm.php
--------------------------------------------------------------------------------
FOUND 8 ERRORS AND 3 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------------
   8 | ERROR   | Doc comment is empty
  11 | ERROR   | Class name doesn't match filename; expected "class OauthFieldsMappingForm"
  11 | ERROR   | Class name must begin with a capital letter
  13 | ERROR   | Doc comment is empty
  20 | ERROR   | Doc comment is empty
  27 | ERROR   | Doc comment is empty
  33 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  38 | ERROR   | The array declaration extends to column 389 (the limit is 80). The array content should be split up over multiple lines
 156 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 174 | ERROR   | Doc comment is empty
 178 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/Form/OauthRolesMappingForm.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 6 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------------
   8 | ERROR   | Doc comment is empty
  11 | ERROR   | Class name doesn't match filename; expected "class OauthRolesMappingForm"
  11 | ERROR   | Class name must begin with a capital letter
  13 | ERROR   | Doc comment is empty
  20 | ERROR   | Doc comment is empty
  27 | ERROR   | Doc comment is empty
  42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  51 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  54 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  55 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  58 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 115 | ERROR   | Doc comment is empty
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/Service/OAuthTokenService.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
 10 | ERROR   | Doc comment is empty
 17 | ERROR   | Doc comment is empty
 21 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
 21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 25 | ERROR   | Doc comment is empty
 31 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
 31 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 53 | ERROR   | Doc comment is empty
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/src/Controller/OauthLogin.php
--------------------------------------------------------------------------------
FOUND 25 ERRORS AND 19 WARNINGS AFFECTING 40 LINES
--------------------------------------------------------------------------------
  15 | ERROR   | Doc comment is empty
  20 | ERROR   | Missing member variable doc comment
  21 | ERROR   | Missing member variable doc comment
  22 | ERROR   | Missing member variable doc comment
  23 | ERROR   | Missing member variable doc comment
  24 | ERROR   | Missing member variable doc comment
  25 | ERROR   | Missing member variable doc comment
  26 | ERROR   | Missing member variable doc comment
  28 | ERROR   | Doc comment is empty
  32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  33 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  36 | ERROR   | Doc comment is empty
  76 | ERROR   | Doc comment is empty
  80 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("code") instead  
  80 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("error") instead 
  91 | ERROR   | Doc comment is empty
  95 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  96 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("code") instead  
  96 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("error") instead 
 108 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("code") instead  
 109 | ERROR   | The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get("code") instead  
 124 | ERROR   | Doc comment is empty
 129 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 130 | WARNING | User::loadMultiple calls should be avoided in classes, use dependency injection instead
 221 | ERROR   | Doc comment is empty
 247 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 253 | ERROR   | Doc comment is empty
 266 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 276 | ERROR   | Doc comment is empty
 280 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 289 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 325 | ERROR   | Doc comment is empty
 340 | ERROR   | Doc comment is empty
 345 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
 345 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 351 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
 363 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 367 | ERROR   | Doc comment is empty
 372 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
 372 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 376 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
 383 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 388 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 396 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------


FILE: azure_oauth_sso/azure_oauth_sso.module
----------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 13 LINES
----------------------------------------------------------------------------
   3 | ERROR | Missing short description in doc comment
  15 | ERROR | Doc comment is empty
  19 | ERROR | Doc comment is empty
  26 | ERROR | Doc comment is empty
  30 | ERROR | Doc comment is empty
  52 | ERROR | Doc comment is empty
  56 | ERROR | Doc comment is empty
  70 | ERROR | Doc comment is empty
  74 | ERROR | Doc comment is empty
  90 | ERROR | Doc comment is empty
  94 | ERROR | Doc comment is empty
 104 | ERROR | Doc comment is empty
 108 | ERROR | Doc comment is empty
----------------------------------------------------------------------------