Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Items:
FILE: ...upal8/modules/xmlsitemap/src/Controller/XmlSitemapController.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
15 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
33 | ERROR | Parameter $twig is not described in comment
----------------------------------------------------------------------
FILE: ...DCO/Drupal8/modules/xmlsitemap/src/Form/XmlSitemapDeleteForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
17 | ERROR | Public method name
| | "XmlSitemapDeleteForm::getBaseFormID" is not in
| | lowerCamel format
----------------------------------------------------------------------
FILE: ...8/modules/xmlsitemap/src/Form/XmlSitemapEntitiesSettingsForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
92 | ERROR | [ ] There must be no space between ? and :
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...modules/xmlsitemap/src/Form/XmlSitemapLinkBundleSettingsForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
15 | ERROR | Class property $entity_type should use lowerCamel
| | naming without underscores
16 | ERROR | Class property $bundle_type should use lowerCamel
| | naming without underscores
99 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------
FILE: ...CO/Drupal8/modules/xmlsitemap/src/Form/XmlSitemapRebuildForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
73 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...O/Drupal8/modules/xmlsitemap/src/Form/XmlSitemapSettingsForm.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
92 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
131 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
261 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: .../modules/xmlsitemap/src/Tests/XmlSitemapEntityFunctionalTest.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------
52 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
56 | WARNING | Line exceeds 80 characters; contains 91 characters
75 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
93 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
105 | ERROR | Doc comment is empty
118 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
----------------------------------------------------------------------
FILE: ...rupal8/modules/xmlsitemap/src/Tests/XmlSitemapFunctionalTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
23 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
46 | ERROR | Public method name
| | "XmlSitemapFunctionalTest::testBaseURL" is not in
| | lowerCamel format
69 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------
FILE: ...upal8/modules/xmlsitemap/src/Tests/XmlSitemapListBuilderTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
25 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...l8/modules/xmlsitemap/src/Tests/XmlSitemapMenuFunctionalTest.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------
40 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
54 | ERROR | Comment indentation error, expected only 4 spaces
61 | WARNING | Line exceeds 80 characters; contains 128 characters
68 | ERROR | Comment indentation error, expected only 4 spaces
----------------------------------------------------------------------
FILE: .../modules/xmlsitemap/src/Tests/XmlSitemapMultilingualNodeTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
26 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...pal8/modules/xmlsitemap/src/Tests/XmlSitemapMultilingualTest.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
49 | WARNING | Line exceeds 80 characters; contains 99 characters
----------------------------------------------------------------------
FILE: .../modules/xmlsitemap/src/Tests/XmlSitemapMultilingualTestBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
25 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...l8/modules/xmlsitemap/src/Tests/XmlSitemapNodeFunctionalTest.php
----------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 13 LINES
----------------------------------------------------------------------
37 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
38 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
47 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
97 | ERROR | Doc comment is empty
115 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
119 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
125 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
130 | ERROR | Doc comment is empty
135 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
148 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
162 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
170 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
180 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...O/Drupal8/modules/xmlsitemap/src/Tests/XmlSitemapRebuildTest.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
26 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
53 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
59 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: .../DCO/Drupal8/modules/xmlsitemap/src/Tests/XmlSitemapTestBase.php
----------------------------------------------------------------------
FOUND 36 ERRORS AND 2 WARNINGS AFFECTING 38 LINES
----------------------------------------------------------------------
27 | ERROR | Class property $admin_user should use lowerCamel
| | naming without underscores
34 | ERROR | Class property $normal_user should use lowerCamel
| | naming without underscores
113 | ERROR | Parameter $group is not described in comment
116 | ERROR | Missing parameter type
119 | ERROR | Missing parameter type
122 | ERROR | Return type missing for @return tag in function
| | comment
145 | ERROR | Missing parameter type
147 | ERROR | Missing parameter type
148 | WARNING | Line exceeds 80 characters; contains 87 characters
150 | ERROR | Missing parameter type
154 | ERROR | Return type missing for @return tag in function
| | comment
176 | ERROR | Doc comment is empty
191 | ERROR | Doc comment is empty
206 | ERROR | Doc comment is empty
214 | ERROR | Doc comment is empty
222 | ERROR | Doc comment is empty
235 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
239 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
244 | ERROR | Doc comment is empty
257 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
261 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
266 | ERROR | Doc comment is empty
277 | ERROR | Doc comment is empty
288 | ERROR | Doc comment is empty
310 | ERROR | Doc comment is empty
329 | ERROR | Doc comment is empty
332 | ERROR | Protected method name
| | "XmlSitemapTestBase::assertXMLSitemapProblems" is
| | not in lowerCamel format
341 | ERROR | Doc comment is empty
344 | ERROR | Protected method name
| | "XmlSitemapTestBase::assertNoXMLSitemapProblems" is
| | not in lowerCamel format
363 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
380 | ERROR | Doc comment is empty
387 | ERROR | Doc comment is empty
403 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
421 | ERROR | Missing parameter type
424 | ERROR | Return type missing for @return tag in function
| | comment
440 | WARNING | Line exceeds 80 characters; contains 91 characters
450 | ERROR | Missing parameter type
452 | ERROR | Missing parameter type
----------------------------------------------------------------------
FILE: .../DCO/Drupal8/modules/xmlsitemap/src/Tests/XmlSitemapUnitTest.php
----------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
----------------------------------------------------------------------
18 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
129 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
148 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
219 | WARNING | Line exceeds 80 characters; contains 83 characters
233 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
240 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
254 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
----------------------------------------------------------------------
FILE: ...l8/modules/xmlsitemap/src/Tests/XmlSitemapUserFunctionalTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
31 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...jects/DCO/Drupal8/modules/xmlsitemap/src/XmlSitemapGenerator.php
----------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------
33 | ERROR | Class property $last_language should use lowerCamel
| | naming without underscores
40 | ERROR | Class property $memory_start should use lowerCamel
| | naming without underscores
70 | ERROR | Parameter $language_manager is not described in
| | comment
217 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
234 | WARNING | Line exceeds 80 characters; contains 93 characters
234 | ERROR | Comment indentation error, expected only 3 spaces
295 | WARNING | Code after THROW statement cannot be executed
318 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
351 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
433 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
----------------------------------------------------------------------
FILE: .../Drupal8/modules/xmlsitemap/src/XmlSitemapGeneratorInterface.php
----------------------------------------------------------------------
FOUND 21 ERRORS AFFECTING 19 LINES
----------------------------------------------------------------------
22 | ERROR | Type hint "Drupal\Core\Language\LanguageInterface"
| | missing for $language
32 | ERROR | Missing parameter comment
53 | ERROR | Missing parameter type
62 | ERROR | Missing parameter type
64 | ERROR | Missing parameter type
69 | ERROR | Parameter $chunk is not described in comment
76 | ERROR | Doc comment for parameter $pageAn does not match
| | actual variable name $chunk
77 | ERROR | Parameter comment must start with a capital letter
85 | ERROR | Missing parameter type
110 | ERROR | Parameter $elapsed is not described in comment
119 | ERROR | Doc comment for parameter $elapsedTime does not match
| | actual variable name $elapsed
120 | ERROR | Parameter comment must start with a capital letter
123 | ERROR | Type hint "array" missing for $results
123 | ERROR | Type hint "array" missing for $operations
135 | ERROR | Type hint "array" missing for $context
145 | ERROR | Type hint "array" missing for $context
147 | ERROR | Parameter $elapsed is not described in comment
156 | ERROR | Doc comment for parameter $elapsedTime does not match
| | actual variable name $elapsed
157 | ERROR | Parameter comment must start with a capital letter
160 | ERROR | Type hint "array" missing for $results
160 | ERROR | Type hint "array" missing for $operations
----------------------------------------------------------------------
FILE: ...cts/DCO/Drupal8/modules/xmlsitemap/src/XmlSitemapIndexWriter.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
41 | ERROR | Public method name "XmlSitemapIndexWriter::generateXML"
| | is not in lowerCamel format
----------------------------------------------------------------------
FILE: ...jects/DCO/Drupal8/modules/xmlsitemap/src/XmlSitemapInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
129 | ERROR | Missing parameter name
----------------------------------------------------------------------
FILE: ...cts/DCO/Drupal8/modules/xmlsitemap/src/XmlSitemapLinkStorage.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
120 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
123 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
133 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
----------------------------------------------------------------------
FILE: ...rupal8/modules/xmlsitemap/src/XmlSitemapLinkStorageInterface.php
----------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------
43 | ERROR | Return type missing for @return tag in function
| | comment
46 | ERROR | Type hint "array" missing for $original_link
59 | ERROR | Return type missing for @return tag in function
| | comment
72 | ERROR | Missing parameter type
78 | ERROR | Return type missing for @return tag in function
| | comment
86 | ERROR | Doc comment short description must be on a single
| | line, further text should be a separate paragraph
92 | ERROR | Return type missing for @return tag in function
| | comment
97 | ERROR | Parameter $check_flag is not described in comment
100 | ERROR | Doc comment short description must be on a single
| | line, further text should be a separate paragraph
107 | ERROR | Return type missing for @return tag in function
| | comment
110 | ERROR | Type hint "array" missing for $updates
110 | ERROR | Type hint "array" missing for $conditions
117 | ERROR | Missing parameter type
120 | ERROR | Return type missing for @return tag in function
| | comment
132 | ERROR | Return type missing for @return tag in function
| | comment
----------------------------------------------------------------------
FILE: ...projects/DCO/Drupal8/modules/xmlsitemap/src/XmlSitemapWriter.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
45 | ERROR | Class property $sitemap_page should use lowerCamel
| | naming without underscores
121 | ERROR | @return doc comment specified, but function has no
| | return statement
124 | ERROR | Public method name "XmlSitemapWriter::writeXSL" is not
| | in lowerCamel format
150 | ERROR | Public method name "XmlSitemapWriter::generateXML" is
| | not in lowerCamel format
160 | ERROR | Parameter tags must be grouped together in a doc
| | comment
221 | ERROR | Public method name "XmlSitemapWriter::getURI" is not
| | in lowerCamel format
----------------------------------------------------------------------
Proposed resolution
Fixed items following Drupal Coding Standards and https://www.drupal.org/docs/7/site-building-best-practices/best-practices
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#2 | fixed_all_items_of-2908025-2.patch | 49.35 KB | renatog |
Comments
Comment #2
renatogPatch with the fix.
Comment #4
renatogFixed.
Committed to the dev branch.
Regards.
Comment #5
renatog