Hi,
I ran the following command to check for coding standards violations:
vendor/bin/phpcs -s web/modules/contrib/matomo_reporting_api --report-junit=junit.xml --report-full --report-summary --report-source
Then, I applied automatic fixes with:
vendor/bin/phpcbf -s web/modules/contrib/matomo_reporting_api
PHPCBF Result Summary:
----------------------------------------------------------------------
FILE FIXED REMAINING
----------------------------------------------------------------------
...eporting_api/matomo_reporting_api.post_update.php 16 11
.../EventSubscriber/MatomoReportingApiSubscriber.php 29 12
...ib/matomo_reporting_api/src/Form/SettingsForm.php 216 37
...ontrib/matomo_reporting_api/src/ConfigHandler.php 51 17
...b/matomo_reporting_api/src/MatomoQueryFactory.php 61 17
...src/Exception/MissingMatomoServerUrlException.php 8 10
...tomo_reporting_api/src/ConfigHandlerInterface.php 7 6
...reporting_api/src/MatomoQueryFactoryInterface.php 5 7
...porting_api/tests/src/Kernel/AccessDeniedTest.php 21 9
...eporting_api/tests/src/Unit/ConfigHandlerTest.php 304 46
...xample/src/Plugin/Block/MatomoStatisticsBlock.php 107 29
----------------------------------------------------------------------
A TOTAL OF 825 ERRORS WERE FIXED IN 11 FILES
----------------------------------------------------------------------
After running phpcs again, I still found some issues:
FILE: ...ontrib/matomo_reporting_api/matomo_reporting_api.post_update.php
----------------------------------------------------------------------
FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
| | (Generic.Commenting.DocComment.MissingShort)
6 | WARNING | PHP version not specified
| | (PEAR.Commenting.FileComment.MissingVersion)
6 | ERROR | Missing @category tag in file comment
| | (PEAR.Commenting.FileComment.MissingCategoryTag)
6 | ERROR | Missing @package tag in file comment
| | (PEAR.Commenting.FileComment.MissingPackageTag)
6 | ERROR | Missing @author tag in file comment
| | (PEAR.Commenting.FileComment.MissingAuthorTag)
6 | ERROR | Missing @license tag in file comment
| | (PEAR.Commenting.FileComment.MissingLicenseTag)
6 | ERROR | Missing @link tag in file comment
| | (PEAR.Commenting.FileComment.MissingLinkTag)
12 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
13 | ERROR | Function name
| | "matomo_reporting_api_post_update_copy_matomo_config"
| | is prefixed with a package name but does not begin
| | with a capital letter
| | (PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital)
13 | ERROR | Function name
| | "matomo_reporting_api_post_update_copy_matomo_config"
| | is invalid; consider
| | "Matomo_Reporting_Api_Post_Update_Copy_Matomo_config"
| | instead
| | (PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid)
22 | WARNING | Line exceeds 85 characters; contains 101 characters
| | (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------
FILE: ...porting_api/src/EventSubscriber/MatomoReportingApiSubscriber.php
----------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
14 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
14 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
14 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
14 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
14 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
28 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
44 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
46 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
51 | WARNING | Line exceeds 85 characters; contains 110 characters
| | (Generic.Files.LineLength.TooLong)
54 | WARNING | Line exceeds 85 characters; contains 87 characters
| | (Generic.Files.LineLength.TooLong)
63 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
----------------------------------------------------------------------
FILE: ...b/modules/contrib/matomo_reporting_api/src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 22 ERRORS AND 15 WARNINGS AFFECTING 30 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
19 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
19 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
19 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
19 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
19 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
40 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
42 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
44 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
47 | WARNING | Line exceeds 85 characters; contains 141 characters
| | (Generic.Files.LineLength.TooLong)
54 | ERROR | Doc comment for parameter "$container" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
56 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
68 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
76 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
82 | ERROR | Doc comment for parameter "$form" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
82 | ERROR | Doc comment for parameter "$form_state" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
84 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
91 | WARNING | Line exceeds 85 characters; contains 149 characters
| | (Generic.Files.LineLength.TooLong)
104 | WARNING | Line exceeds 85 characters; contains 102 characters
| | (Generic.Files.LineLength.TooLong)
128 | WARNING | Line exceeds 85 characters; contains 268 characters
| | (Generic.Files.LineLength.TooLong)
138 | WARNING | Line exceeds 85 characters; contains 86 characters
| | (Generic.Files.LineLength.TooLong)
141 | WARNING | Line exceeds 85 characters; contains 99 characters
| | (Generic.Files.LineLength.TooLong)
158 | WARNING | Line exceeds 85 characters; contains 186 characters
| | (Generic.Files.LineLength.TooLong)
169 | ERROR | Doc comment for parameter "$form" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
169 | ERROR | Doc comment for parameter "$form_state" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
171 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
179 | WARNING | Line exceeds 85 characters; contains 107 characters
| | (Generic.Files.LineLength.TooLong)
184 | WARNING | Line exceeds 85 characters; contains 86 characters
| | (Generic.Files.LineLength.TooLong)
187 | WARNING | Line exceeds 85 characters; contains 99 characters
| | (Generic.Files.LineLength.TooLong)
208 | WARNING | Line exceeds 85 characters; contains 107 characters
| | (Generic.Files.LineLength.TooLong)
220 | WARNING | Line exceeds 85 characters; contains 110 characters
| | (Generic.Files.LineLength.TooLong)
232 | WARNING | Line exceeds 85 characters; contains 100 characters
| | (Generic.Files.LineLength.TooLong)
233 | WARNING | Line exceeds 85 characters; contains 94 characters
| | (Generic.Files.LineLength.TooLong)
237 | ERROR | Doc comment for parameter "$form" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
237 | ERROR | Doc comment for parameter "$form_state" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
239 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
249 | WARNING | Line exceeds 85 characters; contains 102 characters
| | (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------
FILE: ...p/web/modules/contrib/matomo_reporting_api/src/ConfigHandler.php
----------------------------------------------------------------------
FOUND 13 ERRORS AND 4 WARNINGS AFFECTING 13 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
16 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
16 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
16 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
16 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
16 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
44 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
46 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
49 | WARNING | Line exceeds 85 characters; contains 111 characters
| | (Generic.Files.LineLength.TooLong)
57 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
60 | WARNING | Line exceeds 85 characters; contains 98 characters
| | (Generic.Files.LineLength.TooLong)
66 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
74 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
88 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
96 | WARNING | Line exceeds 85 characters; contains 103 characters
| | (Generic.Files.LineLength.TooLong)
111 | WARNING | Line exceeds 85 characters; contains 138 characters
| | (Generic.Files.LineLength.TooLong)
113 | ERROR | Expected "} else {\n"; found "}\n else
| | {\n" (PEAR.ControlStructures.ControlSignature.Found)
----------------------------------------------------------------------
FILE: .../modules/contrib/matomo_reporting_api/src/MatomoQueryFactory.php
----------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 13 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
19 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
19 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
19 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
19 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
19 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
54 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
56 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
58 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
61 | WARNING | Line exceeds 85 characters; contains 136 characters
| | (Generic.Files.LineLength.TooLong)
68 | ERROR | Doc comment for parameter "$method" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
70 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
81 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
94 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
96 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
125 | WARNING | Line exceeds 85 characters; contains 146 characters
| | (Generic.Files.LineLength.TooLong)
131 | WARNING | Line exceeds 85 characters; contains 272 characters
| | (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------
FILE: ..._reporting_api/src/Exception/MissingMatomoServerUrlException.php
----------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
9 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
9 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
9 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
9 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
9 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
13 | ERROR | Doc comment for parameter "$message" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
13 | ERROR | Doc comment for parameter "$code" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
13 | ERROR | Doc comment for parameter "$previous" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
16 | WARNING | Line exceeds 85 characters; contains 87 characters
| | (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------
FILE: ...ules/contrib/matomo_reporting_api/src/ConfigHandlerInterface.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
13 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
13 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
13 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
13 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
13 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
----------------------------------------------------------------------
FILE: ...contrib/matomo_reporting_api/src/MatomoQueryFactoryInterface.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
9 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
9 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
9 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
9 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
9 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
16 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
----------------------------------------------------------------------
FILE: ...ntrib/matomo_reporting_api/tests/src/Kernel/AccessDeniedTest.php
----------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
14 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
14 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
14 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
14 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
14 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
29 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
38 | WARNING | Line exceeds 85 characters; contains 100 characters
| | (Generic.Files.LineLength.TooLong)
45 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
----------------------------------------------------------------------
FILE: ...ontrib/matomo_reporting_api/tests/src/Unit/ConfigHandlerTest.php
----------------------------------------------------------------------
FOUND 29 ERRORS AND 17 WARNINGS AFFECTING 34 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
18 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
18 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
18 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
18 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
18 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
38 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
47 | ERROR | Missing short description in doc comment
| | (Generic.Commenting.DocComment.MissingShort)
49 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
54 | WARNING | Line exceeds 85 characters; contains 108 characters
| | (Generic.Files.LineLength.TooLong)
57 | WARNING | Line exceeds 85 characters; contains 88 characters
| | (Generic.Files.LineLength.TooLong)
60 | ERROR | Missing short description in doc comment
| | (Generic.Commenting.DocComment.MissingShort)
60 | ERROR | Doc comment for parameter "$matomo_exists" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
60 | ERROR | Doc comment for parameter "$inherit_matomo_settings"
| | missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
60 | ERROR | Doc comment for parameter "$expected_site_id"
| | missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
63 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
64 | WARNING | Line exceeds 85 characters; contains 117 characters
| | (Generic.Files.LineLength.TooLong)
68 | WARNING | Line exceeds 85 characters; contains 97 characters
| | (Generic.Files.LineLength.TooLong)
74 | WARNING | Line exceeds 85 characters; contains 97 characters
| | (Generic.Files.LineLength.TooLong)
85 | WARNING | Line exceeds 85 characters; contains 124 characters
| | (Generic.Files.LineLength.TooLong)
92 | ERROR | Expected "} else {\n"; found "}\n else {\n"
| | (PEAR.ControlStructures.ControlSignature.Found)
95 | WARNING | Line exceeds 85 characters; contains 111 characters
| | (Generic.Files.LineLength.TooLong)
152 | ERROR | Missing short description in doc comment
| | (Generic.Commenting.DocComment.MissingShort)
152 | ERROR | Doc comment for parameter "$matomo_exists" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
152 | ERROR | Doc comment for parameter "$inherit_matomo_settings"
| | missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
152 | ERROR | Doc comment for parameter "$https_url" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
152 | ERROR | Doc comment for parameter "$http_url" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
152 | ERROR | Doc comment for parameter "$expected_url" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
155 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
156 | WARNING | Line exceeds 85 characters; contains 148 characters
| | (Generic.Files.LineLength.TooLong)
158 | WARNING | Line exceeds 85 characters; contains 97 characters
| | (Generic.Files.LineLength.TooLong)
165 | WARNING | Line exceeds 85 characters; contains 93 characters
| | (Generic.Files.LineLength.TooLong)
176 | WARNING | Line exceeds 85 characters; contains 120 characters
| | (Generic.Files.LineLength.TooLong)
186 | WARNING | Line exceeds 85 characters; contains 97 characters
| | (Generic.Files.LineLength.TooLong)
197 | WARNING | Line exceeds 85 characters; contains 124 characters
| | (Generic.Files.LineLength.TooLong)
359 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
361 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
363 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
365 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
366 | WARNING | Line exceeds 85 characters; contains 92 characters
| | (Generic.Files.LineLength.TooLong)
368 | WARNING | Line exceeds 85 characters; contains 94 characters
| | (Generic.Files.LineLength.TooLong)
386 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
388 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
391 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
392 | WARNING | Line exceeds 85 characters; contains 114 characters
| | (Generic.Files.LineLength.TooLong)
404 | WARNING | Line exceeds 85 characters; contains 98 characters
| | (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------
FILE: ...reporting_api_example/src/Plugin/Block/MatomoStatisticsBlock.php
----------------------------------------------------------------------
FOUND 24 ERRORS AND 5 WARNINGS AFFECTING 18 LINES
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
| | (PEAR.Commenting.FileComment.Missing)
21 | ERROR | Missing @category tag in class comment
| | (PEAR.Commenting.ClassComment.MissingCategoryTag)
21 | ERROR | Missing @package tag in class comment
| | (PEAR.Commenting.ClassComment.MissingPackageTag)
21 | ERROR | Missing @author tag in class comment
| | (PEAR.Commenting.ClassComment.MissingAuthorTag)
21 | ERROR | Missing @license tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLicenseTag)
21 | ERROR | Missing @link tag in class comment
| | (PEAR.Commenting.ClassComment.MissingLinkTag)
22 | WARNING | Line exceeds 85 characters; contains 88 characters
| | (Generic.Files.LineLength.TooLong)
35 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
37 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
39 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
39 | WARNING | Line exceeds 85 characters; contains 89 characters
| | (Generic.Files.LineLength.TooLong)
41 | ERROR | Missing parameter comment
| | (PEAR.Commenting.FunctionComment.MissingParamComment)
41 | WARNING | Line exceeds 85 characters; contains 92 characters
| | (Generic.Files.LineLength.TooLong)
44 | WARNING | Line exceeds 85 characters; contains 136 characters
| | (Generic.Files.LineLength.TooLong)
50 | ERROR | Doc comment for parameter "$container" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
50 | ERROR | Doc comment for parameter "$configuration" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
50 | ERROR | Doc comment for parameter "$plugin_id" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
50 | ERROR | Doc comment for parameter "$plugin_definition"
| | missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
52 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
53 | WARNING | Line exceeds 85 characters; contains 118 characters
| | (Generic.Files.LineLength.TooLong)
65 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
74 | ERROR | Doc comment for parameter "$form" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
74 | ERROR | Doc comment for parameter "$form_state" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
76 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
101 | ERROR | Doc comment for parameter "$form" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
101 | ERROR | Doc comment for parameter "$form_state" missing
| | (PEAR.Commenting.FunctionComment.MissingParamTag)
103 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
112 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
154 | ERROR | Missing @return tag in function comment
| | (PEAR.Commenting.FunctionComment.MissingReturn)
----------------------------------------------------------------------
Time: 81ms; Memory: 8MB
PHP CODE SNIFFER REPORT SUMMARY
----------------------------------------------------------------------
FILE ERRORS WARNINGS
----------------------------------------------------------------------
...eporting_api/matomo_reporting_api.post_update.php 9 2
...xample/src/Plugin/Block/MatomoStatisticsBlock.php 24 5
...ontrib/matomo_reporting_api/src/ConfigHandler.php 13 4
...tomo_reporting_api/src/ConfigHandlerInterface.php 6 0
...b/matomo_reporting_api/src/MatomoQueryFactory.php 14 3
...reporting_api/src/MatomoQueryFactoryInterface.php 7 0
.../EventSubscriber/MatomoReportingApiSubscriber.php 10 2
...src/Exception/MissingMatomoServerUrlException.php 9 1
...ib/matomo_reporting_api/src/Form/SettingsForm.php 22 15
...porting_api/tests/src/Kernel/AccessDeniedTest.php 8 1
...eporting_api/tests/src/Unit/ConfigHandlerTest.php 29 17
----------------------------------------------------------------------
A TOTAL OF 151 ERRORS AND 50 WARNINGS WERE FOUND IN 11 FILES
----------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
SOURCE COUNT
----------------------------------------------------------------------
Generic.Files.LineLength.TooLong 49
PEAR.Commenting.FunctionComment.MissingReturn 29
PEAR.Commenting.FunctionComment.MissingParamTag 27
PEAR.Commenting.FunctionComment.MissingParamComment 22
PEAR.Commenting.ClassComment.MissingAuthorTag 10
PEAR.Commenting.ClassComment.MissingCategoryTag 10
PEAR.Commenting.ClassComment.MissingLicenseTag 10
PEAR.Commenting.ClassComment.MissingLinkTag 10
PEAR.Commenting.ClassComment.MissingPackageTag 10
PEAR.Commenting.FileComment.Missing 10
Generic.Commenting.DocComment.MissingShort 4
PEAR.ControlStructures.ControlSignature.Found 2
PEAR.Commenting.FileComment.MissingAuthorTag 1
PEAR.Commenting.FileComment.MissingCategoryTag 1
PEAR.Commenting.FileComment.MissingLicenseTag 1
PEAR.Commenting.FileComment.MissingLinkTag 1
PEAR.Commenting.FileComment.MissingPackageTag 1
PEAR.Commenting.FileComment.MissingVersion 1
PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid 1
PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital 1
----------------------------------------------------------------------
A TOTAL OF 201 SNIFF VIOLATIONS WERE FOUND IN 20 SOURCES
----------------------------------------------------------------------
Iβm not sure if Iβm working on the correct branch or if these issues have already been addressed elsewhere. Could you clarify if these need to be fixed or if they are resolved in another branch? I want to avoid duplicating effort.
Thank you, and I look forward to your guidance!
Hi @izus,
I searched for occurrences of drupal_get_path() in the module's code to address the deprecation issue, but I couldn't find any reference to it. Could you confirm if there's a specific branch or version where this error appears, or if it might be related to custom code or an outdated version of the module? Let me know how you'd like to proceed.
ismaelromero β made their first commit to this issueβs fork.
I'm taking a look and working on it
ismaelromero β created an issue.
I've made some changes, waiting for a review.
Thanks
ismaelromero β created an issue.
I've already submitted a commit with some changes, but there's some work to to:
FILE: ...ters_or/plugins/views_contextual_filters_or_search_api_query.inc
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
11 | ERROR | Class name must begin with a capital letter
11 | ERROR | Class name must use UpperCamel naming without
| | underscores
16 | ERROR | Public method name
| | "views_contextual_filters_or_search_api_query::option_definition"
| | is not in lowerCamel format
31 | ERROR | Public method name
| | "views_contextual_filters_or_search_api_query::options_form"
| | is not in lowerCamel format
----------------------------------------------------------------------
FILE: ...textual_filters_or/plugins/views_contextual_filters_or_query.inc
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
11 | ERROR | Class name must begin with a capital letter
11 | ERROR | Class name must use UpperCamel naming without
| | underscores
16 | ERROR | Public method name
| | "views_contextual_filters_or_query::option_definition"
| | is not in lowerCamel format
31 | ERROR | Public method name
| | "views_contextual_filters_or_query::options_form" is
| | not in lowerCamel format
48 | ERROR | Public method name
| | "views_contextual_filters_or_query::add_where" is not
| | in lowerCamel format
61 | ERROR | Public method name
| | "views_contextual_filters_or_query::add_where_expression"
| | is not in lowerCamel format
----------------------------------------------------------------------
ismaelromero β created an issue.
I've already made a commit with the solution 1274dd6b6332520f42faea82e35a1af7251f1761 in the 3491900-coding-standards-issues branch but I cant make a Merge Request
ismaelromero β created an issue.
ismaelromero β created an issue.
ismaelromero β created an issue.
ismaelromero β created an issue.
Hi there,
I'm taking a look at this issue. I'll update here once I've made some progress.
Cheers
I was able to replicate the error you mentioned in a local environment, as shown in the screenshots below:
Alternative text configuration
Sourcecode without entity
Alt text without entity
To address this, I added \Drupal\Component\Utility\Html::decodeEntities to Xss::filter($caption) in the _colorbox_formatter_get_caption function located in web/modules/contrib/colorbox/colorbox.theme.inc. I also committed this solution to the 3469260-custom-caption-with-tokens branch.
After clearing the cache, the updated results can be seen in the following screenshots:
Source code with entity
I am submitting the ticket for review and am available for any suggestions or feedback.
ismaelromero β made their first commit to this issueβs fork.
The issue was due to the required jquery.colorbox-min.js library missing from the libraries folder.
The folder structure was as follows:
./libraries
βββ dompurify
βββ dist
βββ purify.cjs.js
βββ purify.cjs.js.map
βββ purify.es.mjs
βββ purify.es.mjs.map
βββ purify.js
βββ purify.js.map
βββ purify.min.js
βββ purify.min.js.map
While searching in the Drupal forums, I found the following comment by Nevets β
It mentions: Β«Drush users can use the command "drush colorbox-plugin"Β».
Upon running it, Drush responded with:
The colorbox library has been successfully downloaded to /app/web/libraries/colorbox
This installed the required library with the following structure:
./libraries
βββ colorbox
β βββ bower.json
β βββ colorbox.ai
β βββ content
β βββ example1
β βββ example2
β βββ example3
β βββ example4
β βββ example5
β βββ i18n
β βββ jquery.colorbox.js
β βββ jquery.colorbox-min.js <===
β βββ LICENSE.md
β βββ package.json
β βββ README.md
βββ dompurify
βββ dist
After clearing the cache, I was able to see the image in the popup.
The issue was due to the required jquery.colorbox-min.js library missing from the libraries folder. The folder structure was as follows:
./libraries
βββ dompurify
βββ dist
βββ purify.cjs.js
βββ purify.cjs.js.map
βββ purify.es.mjs
βββ purify.es.mjs.map
βββ purify.js
βββ purify.js.map
βββ purify.min.js
βββ purify.min.js.map
While searching in the Drupal forums, I found the following comment by Nevets β
It mentions: Β«Drush users can use the command "drush colorbox-plugin"Β».
Upon running it, Drush responded with:
The colorbox library has been successfully downloaded to /app/web/libraries/colorbox
This installed the required library with the following structure:
The issue was due to the required jquery.colorbox-min.js library missing from the libraries folder. The folder structure was as follows:
./libraries
βββ dompurify
βββ dist
βββ purify.cjs.js
βββ purify.cjs.js.map
βββ purify.es.mjs
βββ purify.es.mjs.map
βββ purify.js
βββ purify.js.map
βββ purify.min.js
βββ purify.min.js.map
While searching in the Drupal forums, I found the following comment by Nevets β :
It mentions: Β«Drush users can use the command "drush colorbox-plugin"Β».
Upon running it, Drush responded with:
The colorbox library has been successfully downloaded to /app/web/libraries/colorbox
This installed the required library with the following structure:
./libraries
βββ colorbox
β βββ bower.json
β βββ colorbox.ai
β βββ content
β βββ example1
β βββ example2
β βββ example3
β βββ example4
β βββ example5
β βββ i18n
β βββ jquery.colorbox.js
β βββ jquery.colorbox-min.js <===
β βββ LICENSE.md
β βββ package.json
β βββ README.md
βββ dompurify
βββ dist
After clearing the cache, I was able to see the image in the popup.
To replicate the issue, I followed these steps using Drupal 11:
- From the Colorbox module directory (modules/contrib/colorbox), I switched to the branch 3475297-does-not-open.
Installed the required DOMPurify library, necessary for the proper functioning of the module, using the following command:
drush colorbox:dompurify
You can verify the installation with the same command:
drush colorbox:dompurify
- Created a new content type called "Image page", which includes an image field where the display mode is set to Colorbox.
- Created content using this content type, attaching an image.
- Upon clicking the image, the Colorbox popup does not open as expected. Instead, the image opens directly in a new tab or window.
Hi there,
I'm taking a look at the issue with Colorbox 2.1.1 where links are opening in new tabs instead of a modal. I'll update here once I've made some progress.
Cheers
Hi Izus, thank you for your observation and comment.
I conducted the tests by creating a new content type with two file fields (Multi-file Article):
I then created a test content item using this content type:
Both files are displayed correctly in a single view mode, as shown:
However, I noticed a potential issue: if the content of the first PDF file is too lengthy, the entire text is rendered on the page, which may push down or obscure the content of the second file. This behavior might require a solution, such as limiting the displayed content length.
I remain open to any further comments and/or suggestions.
After completing the installation of the module, applying the relevant patch, and configuring both the module and the Apache Tika extractor, I conducted a series of comprehensive tests. The results confirm that it is now possible to utilize file content in view modes.
Below are images illustrating the process and the results obtained:
-
Article display configuration
-
Article edit with attached file
-
Attachment presented as a generic file
-
Attachment with content displayed
Based on my testing, I can confirm that the requirements are being adequately met.
I welcome any additional comments or suggestions.
Currently going through this issue and the suggested fix. Iβll post my review soon.