Further PHPCS issues

Created on 28 July 2023, over 1 year ago
Updated 24 August 2023, over 1 year ago

Problem/Motivation

PHPCS is complaining about more issues:

FILE: site_guardian/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
 68 | WARNING | Line exceeds 80 characters; contains 232 characters
 69 | WARNING | Line exceeds 80 characters; contains 127 characters
 70 | WARNING | Line exceeds 80 characters; contains 113 characters
 71 | WARNING | Line exceeds 80 characters; contains 122 characters
 74 | WARNING | Line exceeds 80 characters; contains 90 characters
 75 | WARNING | Line exceeds 80 characters; contains 143 characters
 78 | WARNING | Line exceeds 80 characters; contains 108 characters
 79 | WARNING | Line exceeds 80 characters; contains 152 characters
----------------------------------------------------------------------


FILE: site_guardian/src/Form/SiteGuardianForm.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\ConfigFormBase.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: site_guardian/src/Controller/SiteGuardianController.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 118 | ERROR | [x] Multi-line function declarations must define one parameter per line
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: site_guardian/src/Services/SiteGuardianService.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

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

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom the_g_bomb

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

Comments & Activities

Production build 0.71.5 2024