Fix the issues reported by phpcs

Created on 3 July 2023, 12 months ago
Updated 26 August 2023, 10 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/access_policy/access_policy.routing.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
68 | WARNING | Open page callback found, please add a comment before the line
| | why there is no access restriction
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/README.md
-----------------------------------------------------------------------
FOUND 1 ERROR AND 9 WARNINGS AFFECTING 10 LINES
-----------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
4 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
7 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
8 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
9 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
18 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
20 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
54 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
55 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
89 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: ...t/access_policy/tests/src/Functional/AccessPolicyEntityPermissionsTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
39 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...ont/access_policy/tests/src/Functional/AccessRuleUserRoleReferenceTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
54 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ..._cont/access_policy/tests/src/Functional/AccessPolicyEntityListingTest.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
43 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
200 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
262 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
386 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: .../vb/d_cont/access_policy/tests/src/Functional/AccessPolicyCreationTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
41 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
518 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: ...d_cont/access_policy/tests/src/Functional/AccessPolicyEntityAssignTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
40 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...t/access_policy/tests/src/Functional/AccessPolicyUnpublishedEntityTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
68 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...l/vb/d_cont/access_policy/tests/src/Functional/PrivatePolicyAccessTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
49 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
132 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: ...vb/d_cont/access_policy/tests/src/Functional/AccessRuleEntityFieldTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
47 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...html/vb/d_cont/access_policy/tests/src/Functional/AccessRuleWidgetTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
47 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: .../d_cont/access_policy/tests/src/Functional/AccessPolicy403ResponseTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
39 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...nt/access_policy/tests/src/Functional/AccessRulesEntityPermissionsTest.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
41 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
120 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
182 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: ...ml/vb/d_cont/access_policy/tests/src/Kernel/AccessPolicyKernelTestBase.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
29 | ERROR | Do not disable strict config schema checking in tests. Instead
| | ensure your module properly declares its schema for
| | configurations.
--------------------------------------------------------------------------------

FILE: ...olicy/tests/src/Kernel/Plugin/AccessRule/FieldMatchEntityReferenceTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
194 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: ...cont/access_policy/tests/src/Kernel/Plugin/AccessRule/WeekdayRangeTest.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
59 | ERROR | [x] Expected one space after the comma, 0 found
59 | ERROR | [x] Expected one space after the comma, 0 found
59 | ERROR | [x] Expected one space after the comma, 0 found
67 | ERROR | [x] No space found before comment text; expected "//
| | $next_monday_date = date('Y-m-d', strtotime('next sunday'));"
| | but found "//$next_monday_date = date('Y-m-d',
| | strtotime('next sunday'));"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/access_policy.module
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
65 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
246 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
247 | ERROR | [x] Object operator not indented correctly; expected 3 spaces
| | but found 4
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/Form/AccessPolicySortForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
91 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | )
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/Form/AccessRuleFormBase.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
80 | ERROR | The array declaration extends to column 94 (the limit is 80). The
| | array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/Form/AccessRuleMultistepForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
196 | ERROR | The array declaration extends to column 97 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/Form/AccessRuleTableTrait.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
77 | ERROR | The array declaration extends to column 134 (the limit is 80).
| | The array content should be split up over multiple lines
84 | ERROR | The array declaration extends to column 134 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/AccessPolicyValidator.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
159 | ERROR | The array declaration extends to column 100 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/AccessRuleData.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
212 | ERROR | The array declaration extends to column 112 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/SelectQueryStub.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
13 | ERROR | Each @deprecated tag must have a @see tag immediately following
| | it
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/AccessPolicyQueryAlter.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINES
--------------------------------------------------------------------------------
668 | ERROR | The array declaration extends to column 101 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/AccessPolicyPermissions.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------
156 | ERROR | The array declaration extends to column 180 (the limit is 80).
| | The array content should be split up over multiple lines
175 | ERROR | The array declaration extends to column 192 (the limit is 80).
| | The array content should be split up over multiple lines
194 | ERROR | The array declaration extends to column 193 (the limit is 80).
| | The array content should be split up over multiple lines
214 | ERROR | The array declaration extends to column 179 (the limit is 80).
| | The array content should be split up over multiple lines
233 | ERROR | The array declaration extends to column 182 (the limit is 80).
| | The array content should be split up over multiple lines
252 | ERROR | The array declaration extends to column 157 (the limit is 80).
| | The array content should be split up over multiple lines
271 | ERROR | The array declaration extends to column 175 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...html/vb/d_cont/access_policy/src/Plugin/AccessPolicyType/PrivateAccess.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
40 | WARNING | Line exceeds 80 characters; contains 123 characters
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/src/Plugin/AccessRule/Broken.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
41 | ERROR | The array declaration extends to column 93 (the limit is 80). The
| | array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...www/html/vb/d_cont/access_policy/src/Plugin/AccessRule/EntityFieldDate.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
59 | ERROR | [ ] The array declaration extends to column 88 (the limit is
| | 80). The array content should be split up over multiple
| | lines
60 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
61 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
118 | ERROR | [x] Case breaking statements must be followed by a single
| | blank line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...b/d_cont/access_policy/src/Plugin/AccessRule/AccessRulePluginInterface.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
64 | WARNING | The @see url
| | '\Drupal\access_policy\AccessRuleQueryHandler\AccessRuleQueryHandlerInterface'
| | does not match the standard: http(s)://www.drupal.org/node/n or
| | http(s)://www.drupal.org/project/aaa/issues/n
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/access_policy.views.inc
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
27 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | TRUE
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/access_policy/access_policy.api.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
50 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'entity_field_string'
62 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'entity_field_string'
134 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2
| | spaces
141 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 4.88 secs; Memory: 18MB

Steps to reproduce

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

Remaining tasks

Patch review

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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.69.0 2024