Fix .api.php file, descriptions, comments, coding standards

Created on 27 January 2023, almost 2 years ago
Updated 7 February 2023, almost 2 years ago
FILE: /var/www/html/web/modules/contrib/list_formatter/list_formatter.api.php
------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 1 WARNING AFFECTING 13 LINES
------------------------------------------------------------------------------------------
 11 | ERROR   | [x] Doc comment short description must start with a capital letter
 16 | ERROR   | [x] Short array syntax must be used to define arrays
 18 | ERROR   | [x] Inline comments must start with a capital letter
 19 | ERROR   | [x] Short array syntax must be used to define arrays
 22 | ERROR   | [x] Short array syntax must be used to define arrays
 30 | ERROR   | [x] Short array syntax must be used to define arrays
 40 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 43 | ERROR   | [x] Short array syntax must be used to define arrays
 53 | ERROR   | [x] Doc comment short description must start with a capital letter
 55 | ERROR   | [ ] Missing parameter type
 56 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
 56 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
 57 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
 65 | ERROR   | [x] Doc comment short description must start with a capital letter
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/ListFormatterListInterface.php
-------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 12 LINES
-------------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 14 | ERROR | [x] Missing interface doc comment
 16 | ERROR | [ ] Parameter $field_definition is not described in comment
 19 | ERROR | [ ] Missing parameter comment
 19 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
 20 | ERROR | [ ] Missing parameter comment
 20 | ERROR | [ ] Doc comment for parameter $items does not match actual variable name <undefined>
 20 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
 22 | ERROR | [ ] Description for the @return value is missing
 24 | ERROR | [ ] Type hint "[type]" missing for $langcode
 26 | ERROR | [ ] Parameter $elements is not described in comment
 26 | ERROR | [ ] Parameter $field_definition is not described in comment
 26 | ERROR | [ ] Parameter $formatter is not described in comment
 27 | ERROR | [ ] Doc comment short description must start with a capital letter
 27 | ERROR | [ ] Doc comment short description must end with a full stop
 29 | ERROR | [ ] Missing parameter comment
 29 | ERROR | [ ] Doc comment for parameter $form does not match actual variable name $formatter
 29 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
 30 | ERROR | [ ] Missing parameter comment
 30 | ERROR | [ ] Doc comment for parameter $form_state does not match actual variable name $formatter
 30 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
 31 | ERROR | [ ] Missing parameter comment
 31 | ERROR | [ ] Doc comment for parameter $context does not match actual variable name $formatter
 31 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/ListFormatterPluginManager.php
--------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 20 | ERROR | [ ] Parameter $module_handler is not described in comment
 21 | ERROR | [x] Doc comment short description must end with a full stop
 28 | ERROR | [ ] Missing parameter name
 30 | ERROR | [ ] Doc comment for parameter $typed_data_manager does not match actual variable name $module_handler
 44 | ERROR | [ ] Missing parameter comment
 50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
 78 | ERROR | [x] Closing brace indented incorrectly; expected 3 spaces, found 2
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/Field/FieldFormatter/ListFormatter.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 6 WARNINGS AFFECTING 17 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
   5 | ERROR   | [ ] Doc comment short description must end with a full stop
  11 | WARNING | [x] Unused use statement
  31 | ERROR   | [ ] Missing short description in doc comment
  72 | ERROR   | [ ] Expected type hint "ListFormatterPluginManager"; found "PluginManagerInterface" for $list_formatter_manager
  98 | ERROR   | [x] Expected 1 blank line after function; 2 found
 102 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
 135 | ERROR   | [x] No space found before comment text; expected "// Override Comma with custom separator." but found "//Override Comma with custom separator."
 213 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
 226 | WARNING | [ ] Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders
 233 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
 278 | ERROR   | [x] Case breaking statements must be followed by a single blank line
 278 | ERROR   | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 6
 289 | ERROR   | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 6
 318 | ERROR   | [ ] Key specified for array entry; first entry has no key
 331 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 332 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 336 | ERROR   | [x] Expected 1 space between comma and type hint "FormStateInterface"; 2 found
 336 | ERROR   | [x] Expected one space after the comma, 2 found
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/DefaultList.php
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 39 | ERROR   | [x] Each PHP statement must be on a line by itself
 45 | ERROR   | [ ] Missing short description in doc comment
 46 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/OptionsList.php
-------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 28 | ERROR   | [ ] Missing short description in doc comment
 29 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
 46 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 57 | ERROR   | [ ] Missing short description in doc comment
 58 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/LinkList.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 29 | ERROR   | [x] Short array syntax must be used to define arrays
 34 | ERROR   | [ ] The array declaration extends to column 136 (the limit is 80). The array content should be split up over multiple lines
 40 | ERROR   | [ ] Missing short description in doc comment
 41 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
 46 | ERROR   | [x] Short array syntax must be used to define arrays
 47 | ERROR   | [x] Short array syntax must be used to define arrays
 52 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/NumberList.php
----------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 3 | ERROR | [ ] Missing short description in doc comment
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/EntityReferenceList.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 36 | ERROR   | [x] Comments may not appear after statements
 36 | ERROR   | [x] No space found before comment text; expected "// $display['settings']['list_formatter_contrib'];" but found "//$display['settings']['list_formatter_contrib'];"
 57 | ERROR   | [ ] The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
 67 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 82 | ERROR   | [ ] Missing short description in doc comment
 83 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/TaxonomyList.php
-------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  2 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  2 | ERROR   | [ ] Missing short description in doc comment
 26 | ERROR   | [ ] Missing short description in doc comment
 27 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
 61 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 69 | ERROR   | [ ] Missing short description in doc comment
 70 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Plugin/List/TextList.php
-------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  2 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  2 | ERROR   | [ ] Missing short description in doc comment
 24 | ERROR   | [ ] Missing short description in doc comment
 25 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
 32 | WARNING | [ ] Line exceeds 80 characters; contains 127 characters
 58 | ERROR   | [ ] Missing short description in doc comment
 59 | WARNING | [x] '@todo.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Annotation/ListFormatter.php
---------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------
 14 | ERROR | Missing member variable doc comment
 16 | ERROR | Missing member variable doc comment
 18 | ERROR | Missing member variable doc comment
---------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Tests/OutputTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Missing function doc comment
 18 | ERROR | [x] Short array syntax must be used to define arrays
 31 | ERROR | [x] Short array syntax must be used to define arrays
 31 | ERROR | [x] Short array syntax must be used to define arrays
 33 | ERROR | [x] Short array syntax must be used to define arrays
 36 | ERROR | [ ] The array declaration extends to column 112 (the limit is 80). The array content should be split up over multiple lines
 36 | ERROR | [x] Short array syntax must be used to define arrays
 43 | ERROR | [x] Short array syntax must be used to define arrays
 46 | ERROR | [x] Short array syntax must be used to define arrays
 52 | ERROR | [x] Short array syntax must be used to define arrays
 55 | ERROR | [x] Short array syntax must be used to define arrays
 56 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Tests/UITest.php
-----------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 15 | ERROR | [x] Missing function doc comment
 16 | ERROR | [x] Short array syntax must be used to define arrays
 26 | ERROR | [ ] Public method name "UITest::testUI" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/list_formatter/src/Tests/TestBase.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 22 | ERROR | [x] Short array syntax must be used to define arrays
 24 | ERROR | [x] Missing function doc comment
 27 | ERROR | [ ] The array declaration extends to column 122 (the limit is 80). The array content should be split up over multiple lines
 27 | ERROR | [x] Short array syntax must be used to define arrays
 32 | ERROR | [ ] The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
 32 | ERROR | [x] Short array syntax must be used to define arrays
 35 | ERROR | [x] Short array syntax must be used to define arrays
 42 | ERROR | [x] Short array syntax must be used to define arrays
 48 | ERROR | [x] Short array syntax must be used to define arrays
 51 | ERROR | [x] Short array syntax must be used to define arrays
 57 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

Time: 787ms; Memory: 12MB

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024