- Issue created by @sunil jolapara
- Merge request !11Issue #3477249 "Fix the phpcodesniffer issues" β (Open) created by sunil jolapara
FILE: funnelback\funnelback.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: funnelback\funnelback.libraries.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
17 | ERROR | [x] Expected 1 newline at end of file; 3 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
FILE: funnelback\funnelback.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: funnelback\src\Controller\FunnelbackPageController.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
-------------------------------------------------------------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
16 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Pager\PagerManagerInterface.
30 | ERROR | [ ] Missing short description in doc comment
35 | ERROR | [ ] Missing short description in doc comment
40 | ERROR | [ ] Missing short description in doc comment
45 | ERROR | [ ] Missing short description in doc comment
50 | ERROR | [ ] Missing short description in doc comment
200 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
246 | ERROR | [x] Data types in @param tags need to be fully namespaced
249 | ERROR | [ ] Description for the @return value must be on the next line
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------
FILE: funnelback\src\Form\FunnelbackSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\ConfigFormBase.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------
FILE: funnelback\src\Form\SearchForm.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------
17 | ERROR | Missing short description in doc comment
25 | ERROR | Missing parameter comment
31 | ERROR | Missing short description in doc comment
32 | ERROR | Missing parameter comment
34 | ERROR | Description for the @return value is missing
96 | WARNING | Empty return statement not required here
----------------------------------------------------------------------
FILE: funnelback\src\Funnelback.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 13 LINES
-------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] PHP keywords must be lowercase; expected "use" but found "USE"
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Serialization\Json.
37 | ERROR | [ ] Missing short description in doc comment
42 | ERROR | [ ] Missing short description in doc comment
47 | ERROR | [ ] Missing short description in doc comment
52 | ERROR | [ ] Missing short description in doc comment
57 | ERROR | [ ] Missing short description in doc comment
65 | ERROR | [x] Data types in @param tags need to be fully namespaced
67 | ERROR | [x] Data types in @param tags need to be fully namespaced
69 | ERROR | [x] Data types in @param tags need to be fully namespaced
93 | ERROR | [x] Return type must not contain variable name "$staticResults"
121 | ERROR | [x] Expected "array|null|bool" but found "array|null|boolean" for function return type
415 | ERROR | [ ] Parameter type "String or array" must not contain spaces
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: funnelback\src\FunnelbackClient.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 13 LINES
--------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Render\FormattableMarkup.
8 | ERROR | [x] PHP keywords must be lowercase; expected "use" but found "USE"
9 | WARNING | [x] Unused use statement
17 | ERROR | [ ] Missing member variable doc comment
18 | ERROR | [ ] Missing member variable doc comment
19 | ERROR | [ ] Missing member variable doc comment
21 | ERROR | [ ] Missing short description in doc comment
26 | ERROR | [ ] Missing short description in doc comment
31 | ERROR | [ ] Missing short description in doc comment
39 | ERROR | [ ] Missing parameter comment
40 | ERROR | [ ] Missing parameter comment
41 | ERROR | [ ] Missing parameter comment
62 | ERROR | [ ] Exception type missing for @throws tag in function comment
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------
FILE: funnelback\src\Plugin\Block\ContextualNavigationBlock.php
---------------------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 13 LINES
---------------------------------------------------------------------------------------------
25 | ERROR | [ ] Missing short description in doc comment
30 | ERROR | [ ] Missing short description in doc comment
38 | ERROR | [ ] Missing parameter comment
39 | ERROR | [ ] Missing parameter comment
39 | ERROR | [ ] Missing parameter type
40 | ERROR | [ ] Missing parameter comment
40 | ERROR | [ ] Missing parameter type
41 | ERROR | [ ] Missing parameter comment
42 | ERROR | [ ] Missing parameter comment
42 | ERROR | [x] Data types in @param tags need to be fully namespaced
50 | ERROR | [ ] Missing short description in doc comment
51 | ERROR | [ ] Missing parameter comment
52 | ERROR | [ ] Missing parameter comment
53 | ERROR | [ ] Missing parameter comment
54 | ERROR | [ ] Missing parameter comment
56 | ERROR | [ ] Description for the @return value is missing
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------
FILE: funnelback\src\Plugin\Block\FacetBlock.php
------------------------------------------------------------------------------
FOUND 18 ERRORS AFFECTING 14 LINES
------------------------------------------------------------------------------
25 | ERROR | [ ] Missing short description in doc comment
30 | ERROR | [ ] Missing short description in doc comment
38 | ERROR | [ ] Missing parameter comment
39 | ERROR | [ ] Missing parameter comment
39 | ERROR | [ ] Missing parameter type
40 | ERROR | [ ] Missing parameter comment
40 | ERROR | [ ] Missing parameter type
41 | ERROR | [ ] Missing parameter comment
42 | ERROR | [ ] Missing parameter comment
42 | ERROR | [x] Data types in @param tags need to be fully namespaced
50 | ERROR | [ ] Missing short description in doc comment
51 | ERROR | [ ] Missing parameter comment
51 | ERROR | [x] Data types in @param tags need to be fully namespaced
52 | ERROR | [ ] Missing parameter comment
53 | ERROR | [ ] Missing parameter comment
54 | ERROR | [ ] Missing parameter comment
56 | ERROR | [ ] Description for the @return value is missing
66 | ERROR | [x] Expected 1 blank line after function; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: funnelback\src\Twig\Extention\FunnelbackTwigExtension.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------
FILE: funnelback\tests\src\Unit\FunnelbackTest.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Serialization\Json.
23 | ERROR | [ ] Missing member variable doc comment
25 | ERROR | [ ] Missing member variable doc comment
27 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [ ] Missing member variable doc comment
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
Run phpcs command to get the drupal coding standard issues.
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.
Needs work
2.0
Code