phpcs and phpcbf

Created on 1 July 2024, 5 months ago
Updated 15 July 2024, 4 months ago

Problem/Motivation

command -:

phpcs web/modules/contrib/access_unpublished_linked_nodes-access_unpublished_linked_nodes/

FILE: /var/www/html/testd10/web/modules/cspell/access_unpublished_linked_nodes-3458275/access_unpublished_linked_nodes.module
-----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
  4 | WARNING | [x] Unused use statement
 28 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 58 | ERROR   | [x] Expected newline after closing brace
 65 | ERROR   | [x] Expected 1 blank line after function; 2 found
 75 | ERROR   | [x] Expected 1 newline at end of file; 3 found
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/testd10/web/modules/cspell/access_unpublished_linked_nodes-3458275/src/AccessUnpublishedHelper.php
----------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 7 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------------------------------------------------------
   7 | ERROR   | [x] Missing class doc comment
  57 | WARNING | [ ] Unused variable $href.
  84 | ERROR   | [ ] Parameter $entity is not described in comment
  87 | ERROR   | [ ] Doc comment for parameter $node does not match actual variable name $entity
  94 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
  95 | WARNING | [ ] Unused variable $hasPermission.
  97 | WARNING | [ ] Unused variable $hasPermission.
 100 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 102 | WARNING | [ ] Unused variable $langId.
 116 | ERROR   | [x] Expected 1 space after "=>"; 2 found
 119 | ERROR   | [x] Short array syntax must be used to define arrays
 125 | ERROR   | [x] Short array syntax must be used to define arrays
 131 | ERROR   | [x] Expected newline after closing brace
 152 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
 160 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 187 | ERROR   | [x] Expected newline after closing brace
 245 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
 267 | ERROR   | [x] Expected 1 blank line after function; 0 found
 268 | ERROR   | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/testd10/web/modules/cspell/access_unpublished_linked_nodes-3458275/css/access-unpublished.css
-----------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------
 24 | ERROR | [x] CSS colours must be defined in lowercase; expected #ccc but found #CCC
 29 | ERROR | [ ] Style definitions must end with a semicolon
 58 | ERROR | [x] CSS colours must be defined in lowercase; expected #ccc but found #CCC
 91 | ERROR | [x] CSS colours must be defined in lowercase; expected #ccc but found #CCC
 96 | ERROR | [ ] Style definitions must end with a semicolon
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------

Time: 112ms; Memory: 10MB

Steps to reproduce

Run PHPCS on access_unpublished_linked_nodes-access_unpublished_linked_nodes module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR .

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India chandansha

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.71.5 2024