Fix the issue reported by phpcs

Created on 14 July 2023, over 1 year ago
Updated 27 September 2023, about 1 year ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_api\src\Api\PowerBiClient.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_api\src\Form\PowerBiRestApiTestForm.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_authentication\pwbi_authentication.info.yml
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_authentication\src\Auth\PowerBiAuthentication.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_authentication\src\Controller\PowerBiAuthController.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_authentication\src\Form\PowerBiCredentialsForm.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_authentication\src\PowerBiAuthenticationInterface.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\pwbi_embed.breakpoints.yml
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\pwbi_embed.info.yml
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\pwbi_embed.module
----------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [x] Missing function doc comment
17 | ERROR | [x] Comma not allowed after last value in single-line array declaration
17 | ERROR | [x] Expected one space after the comma, 0 found
23 | ERROR | [x] Missing function doc comment
24 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
25 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
37 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\Form\PowerBiEmbedConfigForm.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\Plugin\Field\FieldFormatter\PowerBiEmbedFormatter.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
138 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
139 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
140 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
141 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\Plugin\Field\FieldType\PowerBiEmbedField.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\Plugin\Field\FieldWidget\PowerBiEmbedWidget.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\Plugin\media\Source\PowerBiEmbedMedia.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\modules\pwbi_embed\src\PowerBiEmbed.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: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\pwbi.info.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\pwbi\README.md
-------------------------------------------------------------------------
FOUND 1 ERROR AND 12 WARNINGS AFFECTING 13 LINES
-------------------------------------------------------------------------
8 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
20 | WARNING | [ ] Line exceeds 80 characters; contains 131 characters
23 | WARNING | [ ] Line exceeds 80 characters; contains 181 characters
25 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
36 | WARNING | [ ] Line exceeds 80 characters; contains 112 characters
37 | WARNING | [ ] Line exceeds 80 characters; contains 126 characters
76 | WARNING | [ ] Line exceeds 80 characters; contains 175 characters
78 | WARNING | [ ] Line exceeds 80 characters; contains 114 characters
86 | WARNING | [ ] Line exceeds 80 characters; contains 120 characters
96 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
98 | WARNING | [ ] Line exceeds 80 characters; contains 118 characters
107 | WARNING | [ ] Line exceeds 80 characters; contains 112 characters
115 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

Steps to reproduce

Run following command:

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

Proposed resolution

Above error/warnings need to be fixed:

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

Production build 0.71.5 2024