Fix PHPCS errors and warnings

Created on 4 January 2023, over 1 year ago
Updated 11 October 2023, 12 months ago

PHPCS reported the following errors and warnings:

FILE: /flexible_permissions/tests/src/Unit/ChainPermissionCalculatorTest.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 2 WARNINGS AFFECTING 17 LINES
--------------------------------------------------------------------------------------------------------------------------------
 157 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
 196 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
 261 | ERROR   | [ ] Description for the @return value is missing
 304 | ERROR   | [x] Missing class doc comment
 306 | ERROR   | [x] Missing function doc comment
 311 | ERROR   | [x] Missing function doc comment
 317 | ERROR   | [x] Missing class doc comment
 319 | ERROR   | [x] Missing function doc comment
 324 | ERROR   | [x] Missing function doc comment
 330 | ERROR   | [x] Missing class doc comment
 334 | ERROR   | [x] Missing class doc comment
 336 | ERROR   | [x] Missing function doc comment
 342 | ERROR   | [x] Missing class doc comment
 344 | ERROR   | [ ] Missing member variable doc comment
 346 | ERROR   | [x] Missing function doc comment
 348 | ERROR   | [x] Expected 1 blank line after function; 0 found
 349 | ERROR   | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------


FILE: /flexible_permissions/src/CalculatedPermissionsItem.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 52 | ERROR | Type hint "array" missing for $permissions
-----------------------------------------------------------------------------------------------------------------


FILE: /flexible_permissions/src/ChainPermissionCalculatorInterface.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
 21 | ERROR | Description for the @return value is missing
--------------------------------------------------------------------------------------------------------------------------


FILE: /flexible_permissions/src/RefinableCalculatedPermissionsInterface.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
 29 | ERROR | Missing parameter type
 31 | ERROR | Missing parameter type
-------------------------------------------------------------------------------------------------------------------------------


FILE: /flexible_permissions/src/CalculatedPermissionsTrait.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 22 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany SolimanHarkas

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024