PHP Coding standard issue

Created on 9 February 2023, over 1 year ago
Updated 13 February 2023, over 1 year ago

Problem/Motivation

Resolve PHP coding standard issues

FILE: /var/www/html/web/modules/custom/openid_connect_login_redirect/openid_connect_login_redirect.routing.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 6 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
-----------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid_connect_login_redirect/README.txt
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
 49 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid_connect_login_redirect/src/Controller/OpenIDConnectLoginRedirectController.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 3 WARNINGS AFFECTING 13 LINES
-------------------------------------------------------------------------------------------------------------------------------------
  17 | WARNING | [x] Unused use statement
  19 | ERROR   | [x] There must be one blank line after the last USE statement; 2 found;
  80 | ERROR   | [x] Data types in @param tags need to be fully namespaced
 131 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 135 | ERROR   | [x] Expected 1 space after "="; 2 found
 138 | ERROR   | [x] Expected 1 space after "="; 2 found
 140 | ERROR   | [x] Language constructs must be followed by a single space; expected 1 space but found "ยทยท"
 146 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
 161 | WARNING | [ ] Only string literals should be passed to t() where possible
 180 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 183 | ERROR   | [ ] If there is no return value for a function, there must not be a @return tag.
 183 | ERROR   | [ ] Description for the @return value is missing
 201 | ERROR   | [x] Expected 1 blank line after function; 0 found
 202 | ERROR   | [x] The closing brace for the class must have an empty line before it

Steps to reproduce

Run phpcs openid_connect_login_redirect

Proposed resolution

Resolve PHPCS and Drupal standard issues and test the code.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia arunkumark Coimbatore

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024