phpcs output
The installed coding standards are MySource, Zend, PSR1, PEAR, PSR12, PSR2, Squiz, DrupalPractice and Drupal
FILE: /var/app/field_group/tests/src/FunctionalJavascript/FieldGroupUiTest.php
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
27 | ERROR | [x] Doc comment short description must end with a full stop
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: /var/app/field_group/tests/src/Functional/FieldGroupTestTrait.php
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
26 | ERROR | [x] Expected "object" but found "\stdClass" for function return type
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------
FILE: /var/app/field_group/tests/src/Functional/EntityDisplayTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
26 | WARNING | [x] A comma should follow the last multiline array item. Found: 'field_group_test'
132 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
156 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/tests/src/Functional/ManageDisplayTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------
84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
97 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
116 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
132 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
133 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
160 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/includes/field_ui.inc
-------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AND 8 WARNINGS AFFECTING 26 LINES
-------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
13 | WARNING | [x] Unused use statement
22 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
24 | ERROR | [ ] Missing parameter comment
24 | ERROR | [ ] Missing parameter type
26 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
26 | ERROR | [ ] Missing parameter comment
28 | ERROR | [x] Expected "object" but found "\stdClass" for function return type
28 | ERROR | [ ] Description for the @return value is missing
82 | ERROR | [ ] Missing parameter comment
84 | ERROR | [ ] Description for the @return value is missing
151 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
213 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
340 | WARNING | [ ] Only string literals should be passed to t() where possible
411 | ERROR | [ ] Description for the @return value must be on the next line
413 | ERROR | [ ] Type hint "array" missing for $row
426 | ERROR | [ ] Type hint "array" missing for $form
474 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
483 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
507 | ERROR | [ ] Type hint "Object" missing for $group
527 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
529 | ERROR | [ ] Missing parameter comment
530 | ERROR | [ ] Missing parameter comment
532 | ERROR | [ ] Type hint "Object" missing for $group
532 | ERROR | [ ] Type hint "array" missing for $settings
532 | ERROR | [x] Expected 0 spaces after reference operator for argument "$group"; 1 found
548 | ERROR | [ ] Type hint "Object" missing for $group
548 | ERROR | [ ] Type hint "array" missing for $settings
548 | ERROR | [x] Expected 0 spaces after reference operator for argument "$group"; 1 found
569 | ERROR | [ ] Description for the @return value must be on the next line
571 | ERROR | [ ] Type hint "Object" missing for $group
597 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
633 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/field_group.install
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
59 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\n"
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/contrib/field_group_migrate/tests/src/Unit/Migrate/d7/FieldGroupTest.php
---------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------
16 | ERROR | Missing member variable doc comment
23 | ERROR | Missing member variable doc comment
---------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/contrib/field_group_migrate/tests/src/Kernel/Migrate/d7/MigrateFieldGroupTest.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------
56 | ERROR | Missing parameter type
58 | ERROR | Missing parameter type
60 | ERROR | Missing parameter type
62 | ERROR | Missing parameter type
75 | ERROR | Type hint "array" missing for $expected_format_settings
75 | ERROR | Type hint "array" missing for $expected_children
99 | ERROR | If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
------------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/contrib/field_group_migrate/src/Plugin/migrate/source/d6/FieldGroup.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------------------
60 | ERROR | Doc comment is empty
104 | ERROR | Doc comment is empty
109 | ERROR | If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
154 | ERROR | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
-------------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/field_group.api.php
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------
82 | ERROR | [ ] Missing parameter type
84 | ERROR | [ ] Missing parameter type
100 | ERROR | [ ] Missing parameter type
102 | ERROR | [ ] Missing parameter type
119 | ERROR | [x] Parameter comment must end with a full stop
120 | ERROR | [ ] Missing parameter type
134 | ERROR | [ ] Missing parameter type
139 | ERROR | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/app/field_group/field_group.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 56 ERRORS AND 16 WARNINGS AFFECTING 56 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
63 | WARNING | [ ] Unused variable $route_name.
183 | 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."
184 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
192 | 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."
193 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
337 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
350 | ERROR | [ ] The text '@deprecated Use field_group_form_process instead.' does not match the standard format: @deprecated in %deprecation-version% and is removed
| | from %removal-version%. %extra-info%.
350 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately following it
352 | ERROR | [ ] Description for the @return value is missing
368 | ERROR | [ ] Description for the @return value is missing
404 | WARNING | [ ] Hook implementations should not duplicate @param documentation
406 | WARNING | [ ] Hook implementations should not duplicate @param documentation
408 | WARNING | [ ] Hook implementations should not duplicate @param documentation
408 | ERROR | [ ] Missing parameter type
411 | ERROR | [ ] Type hint "array" missing for $element
441 | WARNING | [ ] Hook implementations should not duplicate @param documentation
443 | WARNING | [ ] Hook implementations should not duplicate @param documentation
445 | WARNING | [ ] Hook implementations should not duplicate @param documentation
448 | ERROR | [ ] Type hint "\Drupal\Core\Form\FormStateInterface" missing for $form_state
448 | ERROR | [ ] Type hint "array" missing for $form
456 | WARNING | [ ] Hook implementations should not duplicate @param documentation
456 | ERROR | [ ] Missing parameter comment
458 | ERROR | [ ] Type hint "array" missing for $element
485 | ERROR | [ ] Type hint "array" missing for $element
485 | ERROR | [ ] Type hint "array" missing for $context
514 | ERROR | [ ] Missing parameter type
523 | ERROR | [ ] Expected type hint "preprocess"; found "array" for $vars
595 | ERROR | [ ] Type hint "array" missing for $element
595 | ERROR | [ ] Type hint "array" missing for $vars
595 | ERROR | [ ] Type hint "array" missing for $context
600 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
631 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
631 | ERROR | [ ] Unnecessarily gendered language in a comment
649 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
663 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
681 | ERROR | [ ] Missing parameter comment
682 | ERROR | [ ] Missing parameter comment
682 | ERROR | [ ] Missing parameter type
683 | ERROR | [ ] Missing parameter comment
683 | ERROR | [ ] Missing parameter type
723 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
723 | ERROR | [ ] Unnecessarily gendered language in a comment
751 | ERROR | [ ] Parameter tags must be defined first in a doc comment
751 | ERROR | [ ] Missing parameter type
753 | ERROR | [ ] Missing parameter type
755 | ERROR | [ ] Missing parameter type
758 | ERROR | [x] Expected 0 spaces after reference operator for argument "$element"; 1 found
758 | ERROR | [x] Expected 0 spaces after reference operator for argument "$rendering_object"; 1 found
787 | ERROR | [ ] Missing parameter type
790 | ERROR | [ ] Description for the @return value is missing
812 | ERROR | [x] Expected "object" but found "\stdClass" for parameter type
822 | ERROR | [ ] Type hint "\Drupal\Core\Entity\Display\EntityDisplayInterface" missing for $display
867 | ERROR | [ ] Missing parameter type
894 | ERROR | [ ] Missing parameter type
896 | ERROR | [ ] Missing parameter type
898 | ERROR | [ ] Missing parameter type
900 | ERROR | [ ] Missing parameter type
903 | ERROR | [ ] Description for the @return value is missing
939 | ERROR | [ ] Missing parameter type
941 | ERROR | [ ] Missing parameter type
943 | ERROR | [ ] Missing parameter type
945 | ERROR | [ ] Missing parameter type
947 | ERROR | [ ] Missing parameter type
950 | ERROR | [ ] Description for the @return value is missing
968 | ERROR | [ ] Missing parameter type
973 | ERROR | [ ] Description for the @return value is missing
989 | ERROR | [ ] Type hint "array" missing for $element
989 | ERROR | [ ] Type hint "array" missing for $groups
1024 | ERROR | [ ] Description for the @return value is missing
1026 | ERROR | [ ] Type hint "array" missing for $element
1026 | ERROR | [ ] Type hint "array" missing for $groups
1026 | ERROR | [x] Expected 0 spaces after reference operator for argument "$element"; 1 found
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/FieldGroupFormatterInterface.php
--------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 5 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 109 characters
16 | WARNING | Line exceeds 80 characters; contains 103 characters
17 | WARNING | Line exceeds 80 characters; contains 122 characters
17 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
24 | ERROR | Type hint "array" missing for $element
27 | WARNING | Line exceeds 80 characters; contains 118 characters
34 | ERROR | Type hint "array" missing for $element
40 | WARNING | Line exceeds 80 characters; contains 81 characters
--------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/FieldgroupUi.php
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
58 | ERROR | [x] Expected "object" but found "\stdClass" for parameter type
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /var/app/field_group/src/FieldGroupFormatterPluginManager.php
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------
42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
103 | ERROR | [x] Separate the @param and @return sections by a blank line.
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Form/FieldGroupAddForm.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
286 | WARNING | Unused variable $groups_added.
291 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/FieldGroupFormatterBase.php
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
57 | ERROR | [x] Expected "object" but found "\stdClass" for parameter type
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /var/app/field_group/src/FormatterHelper.php
---------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
---------------------------------------------------------------------------------------
42 | ERROR | [ ] Description for the @return value is missing
59 | ERROR | [ ] Description for the @return value is missing
80 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters
115 | ERROR | [x] Expected 1 blank line after function; 2 found
123 | ERROR | [x] Expected 1 blank line after function; 2 found
126 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Plugin/field_group/FieldGroupFormatter/Tabs.php
------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
79 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters
80 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
---------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------
57 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
60 | WARNING | [ ] Unused variable $key.
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
62 | WARNING | Line exceeds 80 characters; contains 86 characters
-------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Element/VerticalTabs.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
24 | ERROR | Type hint "array" missing for $element
44 | WARNING | Line exceeds 80 characters; contains 82 characters
84 | ERROR | Type hint "array" missing for $element
84 | ERROR | Type hint "array" missing for $complete_form
----------------------------------------------------------------------
FILE: /var/app/field_group/src/Element/HorizontalTabs.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
48 | ERROR | Type hint "array" missing for $element
68 | WARNING | Line exceeds 80 characters; contains 82 characters
167 | ERROR | Type hint "array" missing for $element
167 | ERROR | Type hint "array" missing for $complete_form
----------------------------------------------------------------------
FILE: /var/app/field_group/src/Annotation/FieldGroupFormatter.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
65 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
------------------------------------------------------------------------------------------------------------------
FILE: /var/app/field_group/src/Routing/RouteSubscriber.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
40 | WARNING | Unused variable $defaults.
----------------------------------------------------------------------


Comments
Comment #2
avinashm commentedPatch for phpcs fixes.
Comment #3
mrinalini9 commentedPatch #2 is no longer applicable, so moving this to needs work.
Comment #4
vladimirausComment #5
hmendes commentedThere are still some errors in the js files. Changing this to Needs work
Comment #6
vladimirausFixed all errors returned by
Comment #7
sourabhjainComment #8
sourabhjainI have verified #6 and all the PHPCS standard issues has been resolved. Please review.
Comment #9
nils.destoop commentedThx for this great patch. It's currently not applying, so I recreated the patch. After that I'll commit it.
Comment #10
nils.destoop commentedEverything is now committed. Coder is still complaining about a deprecation notice, but that's an issue in coder: https://www.drupal.org/project/coder/issues/3192093