Fix the issues reported by phpcs

Created on 18 October 2023, 8 months ago

Problem/Motivation

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\src\Access\ContentAccessAdminSettingsAccessCheck.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\src\Access\ContentAccessNodePageAccessCheck.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\src\Form\ContentAccessAdminSettingsForm.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
124 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\src\Form\ContentAccessPageForm.php
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Url.
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\src\Form\ContentAccessRoleBasedFormTrait.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\content_access\tests\src\Functional\ContentAccessTestHelperTrait.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityInterface.
102 | WARNING | [ ] Line exceeds 80 characters; contains 137 characters
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Install content access module and perform PHPCS for Drupal Standards

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /modules/contrib/content_access/

Proposed resolution

Fix issues of coading standard.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India viren18febS

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

Comments & Activities

Production build 0.69.0 2024