Drupal Coding Standards Issues | phpcs

Created on 30 January 2023, over 1 year ago
Updated 4 February 2023, over 1 year ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal openid_connect_windows_aad

FILE: ...task\openid_connect_windows_aad\src\Controller\WindowsAadSSOController.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 32 | ERROR | [x] You must use "/**" style comments for a member variable
    |       |     comment
 34 | ERROR | [ ] Parameter $openIDConnectSession is not described in comment
 34 | ERROR | [ ] Parameter $configFactory is not described in comment
 39 | ERROR | [ ] Missing parameter comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...k\openid_connect_windows_aad\src\Plugin\OpenIDConnectClient\WindowsAad.php
--------------------------------------------------------------------------------
FOUND 13 ERRORS AND 1 WARNING AFFECTING 9 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
  41 | ERROR   | [ ] Parameter $datetime_time is not described in comment
  41 | ERROR   | [ ] Parameter $page_cache_kill_switch is not described in
     |         |     comment
  41 | ERROR   | [ ] Parameter $language_manager is not described in comment
  41 | ERROR   | [ ] Parameter $state_token is not described in comment
  41 | ERROR   | [ ] Parameter $auto_discover is not described in comment
 240 | ERROR   | [x] Line indented incorrectly; expected at least 4 spaces,
     |         |     found 2
 240 | ERROR   | [x] Space found before comma in argument list
 242 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: 'https://www.drupal.org/i/3298472'
 324 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 328 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces
     |         |     but found 12
 331 | ERROR   | [x] Expected newline after closing brace
 455 | ERROR   | [x] Expected newline after closing brace
 509 | ERROR   | [x] Expected newline after closing brace
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 488ms; Memory: 10MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇮🇳India Jay Jangid

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

Comments & Activities

Production build 0.69.0 2024