Fix the issues reported by PHPCS

Created on 28 March 2023, about 1 year ago
Updated 6 June 2024, 22 days ago

Problem/Motivation

Fix the issues reported by PHPCS for 4.x

Steps to reproduce

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

Remaining tasks

Fix all the issues:
FILE: ...on/drupal8/web/modules/contrib/conditional_fields/js/conditional_fields.js
--------------------------------------------------------------------------------
FOUND 14 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------------
36 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
89 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
89 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
95 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
95 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
194 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
200 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
203 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
221 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
224 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
245 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
253 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
256 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
276 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: .../web/modules/contrib/conditional_fields/conditional_fields.permissions.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...n/drupal8/web/modules/contrib/conditional_fields/conditional_fields.module
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------
112 | ERROR | [x] Expected "string|false" but found "string|FALSE" for
| | function return type
115 | ERROR | [ ] Type hint "array" missing for $field
162 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
162 | ERROR | [ ] Missing parameter type
164 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
164 | ERROR | [ ] Missing parameter type
166 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
166 | ERROR | [ ] Missing parameter type
178 | ERROR | [ ] Missing parameter type
180 | ERROR | [ ] Missing parameter type
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...html/contribution/drupal8/web/modules/contrib/conditional_fields/README.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
13 | WARNING | Line exceeds 80 characters; contains 390 characters
15 | WARNING | Line exceeds 80 characters; contains 170 characters
87 | WARNING | Line exceeds 80 characters; contains 133 characters
93 | WARNING | Line exceeds 80 characters; contains 98 characters
--------------------------------------------------------------------------------

FILE: ...trib/conditional_fields/tests/src/Unit/ConditionalFieldsFormHelperTest.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
431 | ERROR | The array declaration extends to column 102 (the limit is 80).
| | The array content should be split up over multiple lines
431 | ERROR | The array declaration extends to column 101 (the limit is 80).
| | The array content should be split up over multiple lines
497 | ERROR | The array declaration extends to column 98 (the limit is 80).
| | The array content should be split up over multiple lines
497 | ERROR | The array declaration extends to column 97 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...lds/tests/src/FunctionalJavascript/ConditionalFieldTextWithSummaryTest.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
157 | ERROR | The array declaration extends to column 91 (the limit is 80).
| | The array content should be split up over multiple lines
212 | ERROR | The array declaration extends to column 91 (the limit is 80).
| | The array content should be split up over multiple lines
318 | ERROR | The array declaration extends to column 91 (the limit is 80).
| | The array content should be split up over multiple lines
369 | ERROR | The array declaration extends to column 91 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...onditional_fields/src/Plugin/conditional_fields/handler/OptionsButtons.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
21 | ERROR | The array declaration extends to column 97 (the limit is 80). The
| | array content should be split up over multiple lines
25 | ERROR | The array declaration extends to column 94 (the limit is 80). The
| | array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...odules/contrib/conditional_fields/src/ConditionalFieldsHandlersManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
44 | ERROR | The array declaration extends to column 102 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...b/modules/contrib/conditional_fields/src/Form/ConditionalFieldEditForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
315 | ERROR | The array declaration extends to column 81 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...ules/contrib/conditional_fields/src/Form/ConditionalFieldDeleteFormTab.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
20 | ERROR | Class property $entity_type should use lowerCamel naming without
| | underscores
--------------------------------------------------------------------------------

FILE: ...8/web/modules/contrib/conditional_fields/src/Form/ConditionalFieldForm.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
77 | ERROR | Class property $form_state should use lowerCamel naming without
| | underscores
84 | ERROR | Class property $entity_type should use lowerCamel naming without
| | underscores
91 | ERROR | Class property $bundle_name should use lowerCamel naming without
| | underscores
--------------------------------------------------------------------------------

FILE: ...web/modules/contrib/conditional_fields/src/ConditionalFieldsFormHelper.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
29 | ERROR | [ ] Class property $form_state should use lowerCamel naming
| | without underscores
125 | ERROR | [ ] The array declaration extends to column 92 (the limit is
| | 80). The array content should be split up over multiple
| | lines
127 | ERROR | [ ] The array declaration extends to column 82 (the limit is
| | 80). The array content should be split up over multiple
| | lines
323 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
613 | WARNING | [ ] Line exceeds 80 characters; contains 108 characters
613 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...on/drupal8/web/modules/contrib/conditional_fields/src/DependencyHelper.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
15 | ERROR | Class property $entity_type should use lowerCamel naming without
| | underscores
36 | ERROR | Class property $dependent_field should use lowerCamel naming
| | without underscores
50 | ERROR | Class property $dependent_fields should use lowerCamel naming
| | without underscores
78 | ERROR | Class property $form_fields should use lowerCamel naming without
| | underscores
85 | ERROR | Class property $inheriting_fields should use lowerCamel naming
| | without underscores
--------------------------------------------------------------------------------

FILE: ...les/contrib/conditional_fields/src/ConditionalFieldsElementAlterHelper.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 15 WARNINGS AFFECTING 19 LINES
--------------------------------------------------------------------------------
41 | ERROR | [x] There should be no white space before a closing ")"
59 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment
| | */" or "// Comment" instead
60 | ERROR | [ ] The text '@deprecated Not actual from Drupal 8.7.0. Media
| | entity returns the actual bundle object, rather than id'
| | does not match the standard format: @deprecated in
| | %deprecation-version% and is removed from
| | %removal-version%. %extra-info%.
60 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately
| | following it
110 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
123 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
131 | ERROR | [ ] Parameter $form_state is not described in comment
141 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
145 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
154 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
156 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
158 | WARNING | [ ] Line exceeds 80 characters; contains 110 characters
160 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
162 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
165 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
171 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
172 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
179 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
188 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
224 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...8/web/modules/contrib/conditional_fields/conditional_fields.links.menu.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 3 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 9.49 secs; Memory: 18MB

📌 Task
Status

Needs work

Version

4.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