Fix the issues reported by phpcs

Created on 15 May 2023, over 1 year ago
Updated 16 May 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ala\ala.module
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ala\README.md
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 81 characters
-------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ala\src\Form\ModuleConfigurationForm.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: ...backendassignment\web\modules\contrib\ala\src\Plugin\Field\FieldFormatter\AdvancedLinkAttributesFieldFormatter.php
------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
133 | ERROR | [x] Case breaking statements must be followed by a single blank line
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...tdocs\backendassignment\web\modules\contrib\ala\src\Plugin\Field\FieldWidget\AdvancedLinkAttributesFieldWidget.php
------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
83 | ERROR | [x] Short array syntax must be used to define arrays
86 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
93 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
96 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ala\tests\src\Functional\LoadTest.php
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

Time: 2.16 secs; Memory: 6MB

Steps to reproduce

Run the phpcs command on the module.

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024