Problem/Motivation
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/modules/charts_test/charts_test.routing.yml
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/modules/charts_test/src/Plugin/chart/Library/ChartsTestLibrary.php
--------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------
79 | ERROR | [x] Concat operator must be surrounded by a single space
--------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/src/Traits/ConfigUpdateTrait.php
----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Missing trait doc comment
7 | ERROR | [ ] Parameter $library is not described in comment
13 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
13 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/src/FunctionalJavascript/DataCollectorTableTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
70 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/src/Kernel/ChartsKernelTestBase.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Doc comment short description must end with a full stop
49 | ERROR | [ ] Missing parameter type
59 | ERROR | [ ] Missing short description in doc comment
61 | ERROR | [ ] Missing parameter comment
63 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/src/Kernel/ChartElementTest.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
50 | ERROR | [x] Expected one space after the comma, 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/tests/src/Kernel/DimensionsTest.php
-------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------
25 | ERROR | [ ] Parameter tags must be defined first in a doc comment
60 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
61 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
62 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
63 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
64 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/README.md
-----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
213 | WARNING | Line exceeds 80 characters; contains 115 characters
214 | WARNING | Line exceeds 80 characters; contains 105 characters
-----------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_c3/README.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
124 | WARNING | Line exceeds 80 characters; contains 86 characters
-----------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_c3/src/Plugin/chart/Library/C3.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
87 | ERROR | [x] Concat operator must be surrounded by a single space
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_billboard/README.md
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
104 | WARNING | Line exceeds 80 characters; contains 107 characters
------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_billboard/src/Plugin/chart/Library/Billboard.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
87 | ERROR | [x] Concat operator must be surrounded by a single space
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_highcharts/charts_highcharts.module
----------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------------------
29 | ERROR | [x] Expected 1 space after "=>"; 2 found
61 | ERROR | [x] Case breaking statements must be followed by a single blank line
64 | ERROR | [x] Case breaking statements must be followed by a single blank line
67 | ERROR | [x] Case breaking statements must be followed by a single blank line
70 | ERROR | [x] Case breaking statements must be followed by a single blank line
73 | ERROR | [x] Case breaking statements must be followed by a single blank line
74 | ERROR | [x] There must be no space before the colon in a DEFAULT statement
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_highcharts/tests/src/Kernel/RawOptionsTest.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------
19 | WARNING | [x] A comma should follow the last multiline array item. Found: 'charts_highcharts'
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_highcharts/charts_highcharts.info.yml
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_highcharts/src/Plugin/chart/Library/Highcharts.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
17 | WARNING | [x] Unused use statement
224 | ERROR | [x] Expected one space after the comma, 0 found
314 | WARNING | [ ] Only string literals should be passed to t() where possible
359 | ERROR | [x] Concat operator must be surrounded by a single space
402 | ERROR | [x] Missing function doc comment
675 | ERROR | [x] Use null coalesce operator instead of ternary operator.
844 | ERROR | [x] Missing function doc comment
873 | ERROR | [x] Missing function doc comment
894 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_google/src/Plugin/chart/Library/Google.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
120 | ERROR | [x] Concat operator must be surrounded by a single space
152 | ERROR | [x] Use null coalesce operator instead of ternary operator.
290 | WARNING | [ ] Unused variable $axis_drilldown.
478 | ERROR | [x] Use null coalesce operator instead of ternary operator.
489 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_blocks/charts_blocks.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: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_chartjs/tests/src/Kernel/RawOptionsTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
19 | WARNING | [x] A comma should follow the last multiline array item. Found: 'charts_chartjs'
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_chartjs/tests/src/Kernel/DimensionsTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
27 | ERROR | Parameter tags must be defined first in a doc comment
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_chartjs/README.md
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------
44 | WARNING | Line exceeds 80 characters; contains 97 characters
107 | WARNING | Line exceeds 80 characters; contains 95 characters
119 | WARNING | Line exceeds 80 characters; contains 100 characters
----------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/modules/charts_chartjs/src/Plugin/chart/Library/Chartjs.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
52 | WARNING | [ ] Unused variable $yaxis_configuration.
123 | ERROR | [x] Concat operator must be surrounded by a single space
364 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/src/ConfigUpdater.php
-----------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------
13 | ERROR | [x] Missing class doc comment
36 | ERROR | [ ] Parameter $module_handler is not described in comment
67 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
148 | ERROR | [x] Missing function doc comment
161 | ERROR | [x] Missing function doc comment
180 | WARNING | [ ] Unused variable $id.
233 | ERROR | [x] Expected newline after closing brace
255 | ERROR | [x] Expected newline after closing brace
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/src/Plugin/views/style/ChartsPluginStyleChart.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
365 | ERROR | [x] Expected 1 space(s) after cast statement; 0 found
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/src/Element/BaseSettings.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
639 | ERROR | [x] Use null coalesce operator instead of ternary operator.
1435 | WARNING | [ ] Unused variable $key.
1531 | WARNING | [ ] Unused variable $key.
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/charts/src/Element/ChartDataCollectorTable.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------
164 | ERROR | [x] Use null coalesce operator instead of ternary operator.
178 | ERROR | [x] Use null coalesce operator instead of ternary operator.
547 | ERROR | [x] Use null coalesce operator instead of ternary operator.
551 | ERROR | [x] Use null coalesce operator instead of ternary operator.
790 | WARNING | [ ] Unused variable $row_key.
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------
Time: 1.46 secs; Memory: 20MB
Steps to reproduce
Run the command:
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /drupal/modules/contrib/charts
Proposed resolution
Resolve all the coding standard issues.
Remaining tasks
User interface changes
API changes
Data model changes