Closed (fixed)
Project:
URL path restrictions
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
2 Jan 2026 at 16:14 UTC
Updated:
23 Jan 2026 at 19:24 UTC
Jump to comment: Most recent
The current code base contains various PHP coding standards violations.
Run the phpcs tool against the directory containing the url_path_restrictions module code and view the generate report:
FILE: url_path_restrictions/url_path_restrictions.services.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: url_path_restrictions/url_path_restrictions.links.menu.yml
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/url_path_restrictions.module
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
20 | WARNING | [x] '@TODO Should we restrict redirects, too? E.g., if someone tries to create a redirect from /account/cats, but /account is on the not-allowed list, should this fail validation? I think yes,
| | yes, it should.' should match the format '@todo Fix problem X here.'
20 | WARNING | [ ] There must be no blank line following an inline comment
20 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/tests/src/Unit/DisallowedUrlPatternConstraintValidatorTest.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------
209 | ERROR | [x] Expected newline after closing brace
235 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/tests/src/Unit/RouteValidationSubscriberTest.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------
112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
270 | ERROR | [x] Expected newline after closing brace
279 | ERROR | [x] Expected newline after closing brace
301 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/tests/src/Kernel/RouteValidationIntegrationTest.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 1 WARNING AFFECTING 14 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
49 | ERROR | [x] Whitespace found at end of line
52 | ERROR | [x] Whitespace found at end of line
53 | ERROR | [x] Whitespace found at end of line
59 | ERROR | [x] Whitespace found at end of line
79 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
100 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
120 | ERROR | [x] Whitespace found at end of line
125 | ERROR | [x] Whitespace found at end of line
131 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
138 | ERROR | [x] Whitespace found at end of line
157 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
160 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
164 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
168 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/tests/src/Kernel/UrlAliasValidationTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
134 | ERROR | [x] Whitespace found at end of line
138 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/url_path_restrictions.routing.yml
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/src/Plugin/Validation/Constraint/DisallowedUrlPatternConstraintValidator.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
108 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/src/EventSubscriber/RouteValidationSubscriber.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
68 | ERROR | [x] Whitespace found at end of line
130 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/src/Form/UrlPathRestrictionsSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
78 | ERROR | [x] Whitespace found at end of line
94 | ERROR | [x] Whitespace found at end of line
114 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/url_path_restrictions.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: url_path_restrictions/config/schema/url_path_restrictions.schema.yml
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: url_path_restrictions/config/install/url_path_restrictions.settings.yml
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------
Fix the coding standards violations.
Update the code to fix the violations, run the phpcs tool to verify no errors are generated, and commit the changes.
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
Comment #3
miroslavstankov commentedComment #5
krisahil commented