Created on 20 June 2023, over 1 year ago
Updated 31 July 2023, over 1 year ago

Problem/Motivation

There are some Drupal coding standard errors which needs to to be fixed.

Steps to reproduce

Run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml web/modules/contrib/pdb
FILE: ...t/lampp/htdocs/debugger/web/modules/contrib/pdb/src/ComponentDiscovery.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\Core\Extension\ExtensionDiscovery.
115 | WARNING | [x] There must be no blank line following an inline comment
115 | WARNING | [ ] There must be no blank line following an inline comment
152 | WARNING | [x] There must be no blank line following an inline comment
152 | WARNING | [ ] There must be no blank line following an inline comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ampp/htdocs/debugger/web/modules/contrib/pdb/src/Plugin/Block/PdbBlock.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
17 | WARNING | [ ] The class short comment should describe what the class
| | does and not simply repeat the class name
230 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
253 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately
| | following it
257 | ERROR | [ ] The trigger_error message 'addEntityJsContext() is
| | deprecated in pdb:8.x-1.0 and is removed from pdb:2.0.0.
| | Use ::getContextEntityValue() instead.' does not match the
| | strict standard format: %thing% is deprecated in
| | %deprecation-version% and is removed from
| | %removal-version%. %extra-info%. See %cr-link%
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/debugger/web/modules/contrib/pdb/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
210 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------

FILE: ...ugger/web/modules/contrib/pdb/tests/src/Unit/Plugin/Block/PdbBlockTest.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 10 LINES
--------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\Core\DependencyInjection\ContainerBuilder.
86 | ERROR | [x] Missing function doc comment
90 | ERROR | [x] Missing function doc comment
94 | ERROR | [x] Missing function doc comment
98 | ERROR | [x] Missing function doc comment
102 | ERROR | [x] Missing function doc comment
106 | ERROR | [x] Missing function doc comment
114 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
128 | ERROR | [ ] Key specified for array entry; first entry has no key
143 | ERROR | [ ] No key specified for array entry; first entry specifies
| | key
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...dules/contrib/pdb/tests/src/Unit/Plugin/Derivative/PdbBlockDeriverTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\pdb\ComponentDiscoveryInterface.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: .../pdb/modules/pdb_react/components/react_example_1/react_example_1.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: .../modules/contrib/pdb/modules/pdb_react/components/react_todo/css/index.css
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
6 | ERROR | No style definition found on line; check for missing colon
217 | ERROR | No style definition found on line; check for missing colon
218 | ERROR | No style definition found on line; check for missing colon
219 | ERROR | No style definition found on line; check for missing colon
220 | ERROR | No style definition found on line; check for missing colon
--------------------------------------------------------------------------------

FILE: ...es/contrib/pdb/modules/pdb_react/components/react_todo/react_todo.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: ...docs/debugger/web/modules/contrib/pdb/modules/pdb_react/pdb_react.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
--------------------------------------------------------------------------------

FILE: ...g2/components/ng2_example_configuration/ng2_example_configuration.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: ...ontrib/pdb/modules/pdb_ng2/components/ng2_example_1/ng2_example_1.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: .../modules/contrib/pdb/modules/pdb_ng2/components/ng2_hero/ng2_hero.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: ...ontrib/pdb/modules/pdb_ng2/components/ng2_example_2/ng2_example_2.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: .../pdb/modules/pdb_ng2/components/ng2_example_node/ng2_example_node.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: .../modules/contrib/pdb/modules/pdb_ng2/components/ng2_todo/ng2_todo.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

FILE: ...gger/web/modules/contrib/pdb/modules/pdb_ng2/components/ng2_todo/style.css
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
245 | ERROR | No style definition found on line; check for missing colon
246 | ERROR | No style definition found on line; check for missing colon
247 | ERROR | No style definition found on line; check for missing colon
248 | ERROR | No style definition found on line; check for missing colon
--------------------------------------------------------------------------------

FILE: ...s/debugger/web/modules/contrib/pdb/modules/pdb_ng2/src/Form/PdbNg2Form.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
12 | WARNING | The class short comment should describe what the class does and
| | not simply repeat the class name
51 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

FILE: ...mpp/htdocs/debugger/web/modules/contrib/pdb/modules/pdb_ng2/pdb_ng2.module
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------
6 | ERROR | [x] There must be exactly one blank line after the file comment
12 | ERROR | [ ] Missing parameter comment
14 | ERROR | [x] Expected 1 blank line before function; 2 found
16 | WARNING | [ ] Unused variable $key.
21 | WARNING | [ ] Unused variable $ext.
23 | WARNING | [ ] Unused variable $ext.
28 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...tdocs/debugger/web/modules/contrib/pdb/modules/pdb_ng2/pdb_ng2.routing.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | WARNING | The administration page callback should probably use "administer
| | site configuration" - which implies the user can change
| | something - rather than "access administration pages" which is
| | about viewing but not changing configurations.
--------------------------------------------------------------------------------

FILE: ...p/htdocs/debugger/web/modules/contrib/pdb/modules/pdb_ng2/pdb_ng2.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
--------------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇦🇷Argentina emacoti

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