Problem/Motivation
FILE: conditional_rendering\conditional_rendering.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------
FILE: conditional_rendering\conditional_rendering.module
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeInterface.
13 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
| | hook_foo_BAR_ID_bar() for block templates."
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------
FILE: conditional_rendering\README.md
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
32 | ERROR | [x] Expected 1 newline at end of file; 4 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------
FILE: conditional_rendering\src\EventSubscriber\RenderBlockSubscriber.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\conditional_rendering\TokenConditionalEvaluationService.
101 | ERROR | [x] Expected 1 space before "??"; 0 found
101 | ERROR | [x] Expected 1 space after "??"; 0 found
103 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------
FILE: conditional_rendering\src\Plugin\Field\FieldType\ConditionItem.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] Expected 1 line before declare statement, found 0.
1 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
25 | ERROR | [ ] Missing member variable doc comment
86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
87 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
87 | WARNING | [x] There must be no blank line following an inline comment
87 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
87 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
124 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: conditional_rendering\src\Plugin\Field\FieldWidget\ConditionWidget.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] Expected 1 line before declare statement, found 0.
1 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldDefinitionInterface.
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Run phpcs command to get the drupal coding standard issues.
Proposed resolution
Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.