Fix the issues reported by phpcs

Created on 1 July 2023, over 1 year ago
Updated 6 July 2023, over 1 year ago

Problem/Motivation

There are some issues which are reported by PHP code sniffer.

FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
69 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
-------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\avif_fallback.services.yml
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 102 characters
----------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\src\Controller\ImageStyleDownloadController.php
--------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
38 | ERROR | [ ] Class property $avif_fallbackImageFactory should use lowerCamel naming without underscores
96 | ERROR | [x] Expected one space after the comma, 0 found
121 | ERROR | [x] Expected one space after the comma, 0 found
--------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\src\Form\SettingsForm.php
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\src\ImageFactory.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
117 | ERROR | [ ] Parameter $entity_type_manager is not described in comment
117 | ERROR | [ ] Parameter $file_system is not described in comment
117 | ERROR | [ ] Parameter $mime_type_guesser is not described in comment
129 | ERROR | [x] Expected 1 blank line before function; 2 found
165 | WARNING | [x] 'Todo: prepare function for imagick toolkit.' should match the format '@todo Fix problem X here.'
295 | ERROR | [ ] Missing short description in doc comment
332 | ERROR | [x] Expected 1 blank line after function; 2 found
335 | ERROR | [ ] Missing short description in doc comment
358 | ERROR | [ ] Missing short description in doc comment
372 | ERROR | [ ] Missing short description in doc comment
-----------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\src\ImageFactoryInterface.php
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | WARNING | [x] Unused use statement
-----------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\know-how\modules\custom\avif_fallback\src\Routing\RouteSubscriber.php
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------

Proposed resolution

Need to fix these issues by running php code standard commands.

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

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

Comments & Activities

Production build 0.71.5 2024