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

Issue fork ala-3360289

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:

Comments

sidharth_soman created an issue. See original summary.

sidharth_soman’s picture

Working on it. Will provide an MR.

avpaderno’s picture

Status: Needs work » Active
Issue tags: +Coding standards

sidharth_soman’s picture

Version: 8.x-2.3 » 8.x-1.x-dev
Status: Active » Needs review
avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
Issue tags: +Needs issue summary update

The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command and arguments have been used, and which report that command shown.

sourabhjain’s picture

Issue summary: View changes
avpaderno’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update
aastrong’s picture

Just adding to this,
Using phpcbf, these are the following fixes that were made to follow drupal standards.

https://git.drupalcode.org/project/ala/-/merge_requests/6

I also created a new branch for 8.x-2.x so that it matches the tag numbers that we've created.

aastrong’s picture

Status: Needs review » Fixed

Not only did I merge this is, but i ran phpcbf on my own, and created a secondary MR which address' other issues.
Closing this ticket

aastrong’s picture

Status: Fixed » Closed (fixed)