Problem/Motivation
FILE: ...pal10/web/modules/contrib/accession_reference/accession_reference.install
-------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
4 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements
| | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or
| | "* Implements hook_foo_BAR_ID_bar() for block templates."
5 | ERROR | [ ] Doc comment short description must be on a single line,
| | further text should be a separate paragraph
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...l/contribution/drupal10/web/modules/contrib/accession_reference/README.md
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 93 characters
6 | WARNING | Line exceeds 80 characters; contains 95 characters
7 | WARNING | Line exceeds 80 characters; contains 93 characters
8 | WARNING | Line exceeds 80 characters; contains 90 characters
9 | WARNING | Line exceeds 80 characters; contains 87 characters
-------------------------------------------------------------------------------
FILE: .../accession_reference/tests/src/Functional/AccessionReferenceFieldTest.php
-------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
44 | ERROR | [x] There must be exactly one blank line before the tags in a
| | doc comment
44 | ERROR | [x] Data types in @throws tags need to be fully namespaced
103 | ERROR | [x] Tag value indented incorrectly; expected 1 space but
| | found 7
106 | ERROR | [x] Separate the @dataProvider and @throws sections by a
| | blank line.
106 | ERROR | [x] Data types in @throws tags need to be fully namespaced
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...reference/src/Plugin/Field/FieldFormatter/AccessionReferenceFormatter.php
-------------------------------------------------------------------------------
FOUND 18 ERRORS AFFECTING 9 LINES
-------------------------------------------------------------------------------
57 | ERROR | [x] Expected 1 space after ":"; 2 found
58 | ERROR | [x] Expected 1 space after ":"; 2 found
62 | ERROR | [x] Expected one space after the comma, 0 found
76 | ERROR | [x] No space found before comment text; expected "// $output =
| | $this->numberFormat($item->groupref, $item->itemref);" but
| | found "//$output = $this->numberFormat($item->groupref,
| | $item->itemref);"
82 | ERROR | [x] Expected 1 space(s) after cast statement; 0 found
83 | ERROR | [x] Expected 1 space(s) after cast statement; 0 found
108 | ERROR | [x] Expected 1 space(s) after cast statement; 0 found
109 | ERROR | [x] Expected 1 space(s) after cast statement; 0 found
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [ ] String concat is not required here; use a single string
| | instead
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [ ] String concat is not required here; use a single string
| | instead
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ..._reference/src/Plugin/Field/FieldType/AccessionReferenceItemInterface.php
-------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 10 LINES
-------------------------------------------------------------------------------
9 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "**/"
11 | ERROR | [x] Opening brace should be on the same line as the declaration
12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
15 | ERROR | [x] Expected 1 blank line before function; 0 found
17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
30 | ERROR | [x] Expected 1 blank line after function; 0 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...accession_reference/src/Plugin/Field/FieldType/AccessionReferenceItem.php
-------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------
27 | ERROR | [x] Opening brace should be on the same line as the declaration
34 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
35 | ERROR | [x] Array closing indentation error, expected 4 spaces but
| | found 6
101 | ERROR | [x] There should be no white space before a closing "]"
191 | ERROR | [x] There must be exactly one blank line before the tags in a
| | doc comment
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...ssion_reference/src/Plugin/Field/FieldWidget/AccessionReferenceWidget.php
-------------------------------------------------------------------------------
FOUND 14 ERRORS AND 8 WARNINGS AFFECTING 22 LINES
-------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
31 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
32 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
33 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
34 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
35 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
36 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
37 | ERROR | [x] Array closing indentation error, expected 4 spaces but
| | found 6
92 | ERROR | [x] The first index in a multi-value array must be on a new
| | line
93 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
99 | ERROR | [x] The first index in a multi-value array must be on a new
| | line
100 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
120 | WARNING | [ ] Unused variable $groupref.
121 | WARNING | [ ] Unused variable $itemref.
126 | WARNING | [ ] Unused variable $digits_groupref.
128 | WARNING | [ ] Unused variable $digits_itemref.
144 | WARNING | [ ] Unused variable $digits_groupref.
151 | WARNING | [ ] Unused variable $digits_itemref.
158 | ERROR | [x] Expected 1 space after "=>"; 2 found
163 | ERROR | [ ] The array declaration extends to column 106 (the limit is
| | 80). The array content should be split up over multiple
| | lines
169 | ERROR | [ ] The array declaration extends to column 103 (the limit is
| | 80). The array content should be split up over multiple
| | lines
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...ules/contrib/accession_reference/src/Element/AccessionReferenceWidget.php
-------------------------------------------------------------------------------
FOUND 31 ERRORS AND 6 WARNINGS AFFECTING 25 LINES
-------------------------------------------------------------------------------
9 | ERROR | [x] There must be one blank line after the last USE
| | statement; 2 found;
21 | ERROR | [x] Missing function doc comment
24 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
24 | ERROR | [x] 6 spaces found before inline comment; expected "//
| | '#pre_render' => [" but found "// '#pre_render' =>
| | ["
25 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
25 | ERROR | [ ] Comment indentation error, expected only 6 spaces
26 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
27 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
28 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
28 | ERROR | [ ] Comment indentation error, expected only 6 spaces
29 | WARNING | [x] There must be no blank line following an inline comment
29 | WARNING | [ ] There must be no blank line following an inline comment
29 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 0
40 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces,
| | found 0
40 | ERROR | [x] 8 spaces found before inline comment; expected "//
| | [$class, 'groupElements']," but found "// [$class,
| | 'groupElements'],"
60 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
62 | ERROR | [ ] Type hint "array" missing for $element
63 | ERROR | [x] No space found before comment text; expected "// $element
| | = self::preRenderCompositeFormElement($element);" but
| | found "//$element =
| | self::preRenderCompositeFormElement($element);"
64 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but
| | found 2 spaces
79 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
115 | ERROR | [x] Missing function doc comment
132 | WARNING | [ ] Line exceeds 80 characters; contains 109 characters
132 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
132 | ERROR | [x] 2 spaces found before inline comment; expected "// public
| | static function validateAccessionRef(&$element,
| | FormStateInterface $form_state, &$complete_form) {" but
| | found "// public static function
| | validateAccessionRef(&$element, FormStateInterface
| | $form_state, &$complete_form) {"
132 | ERROR | [x] Inline comments must start with a capital letter
133 | WARNING | [ ] There must be no blank line following an inline comment
133 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
133 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, question marks, colons, or closing parentheses
140 | ERROR | [x] Expected 1 space before opening brace; found 0
158 | ERROR | [ ] Missing short description in doc comment
159 | ERROR | [ ] Description for the @return value is missing
162 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
164 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
164 | ERROR | [x] 4 spaces found before inline comment; expected "//
| | $callbacks[] = 'preRenderAccession';" but found "//
| | $callbacks[] = 'preRenderAccession';"
165 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
167 | ERROR | [x] Expected 1 blank line after function; 0 found
168 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: ...upal10/web/modules/contrib/accession_reference/accession_reference.module
-------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] When importing a class with "use", do not include a leading
| | \
16 | ERROR | [ ] Missing short description in doc comment
17 | ERROR | [ ] Missing parameter comment
18 | ERROR | [ ] If there is no return value for a function, there must not
| | be a @return tag.
18 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
Time: 812ms; Memory: 10MB
Steps to reproduce
Execute: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig accession_reference/
Proposed resolution
Fix all the issues reported for Drupal and DrupalPractice standards
Remaining tasks
Patch review and
FILE: ...ssion_reference/src/Plugin/Field/FieldWidget/AccessionReferenceWidget.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------
122 | WARNING | Unused variable $groupref.
123 | WARNING | Unused variable $itemref.
127 | WARNING | Unused variable $digits_groupref.
129 | WARNING | Unused variable $digits_itemref.
145 | WARNING | Unused variable $digits_groupref.
152 | WARNING | Unused variable $digits_itemref.
-------------------------------------------------------------------------------
Time: 970ms; Memory: 10MB