Problem/Motivation
Phpcs is pointing out some errors and warnings on this module.
Steps to reproduce
Run the following command: phpcs your/file/path
FILE: /Applications/MAMP/htdocs/drupal_10/web/modules/contrib/image_delta_formatter/src/Plugin/Field/FieldFormatter/ImageDeltaFormatter.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 85 ERRORS AND 3 WARNINGS AFFECTING 70 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
2 | ERROR | [ ] Missing file doc comment
20 | ERROR | [ ] Missing @category tag in class comment
20 | ERROR | [ ] Missing @package tag in class comment
20 | ERROR | [ ] Missing @author tag in class comment
20 | ERROR | [ ] Missing @license tag in class comment
20 | ERROR | [ ] Missing @link tag in class comment
21 | ERROR | [x] Opening brace of a class must be on the line after the definition
23 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 2
25 | ERROR | [ ] Missing @return tag in function comment
26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
26 | ERROR | [x] Opening brace should be on a new line
27 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
28 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
29 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
29 | ERROR | [x] TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
30 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
31 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
33 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 2
33 | ERROR | [ ] Doc comment for parameter "$form" missing
33 | ERROR | [ ] Doc comment for parameter "$form_state" missing
35 | ERROR | [ ] Missing @return tag in function comment
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
36 | ERROR | [x] Opening brace should be on a new line
37 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
39 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
40 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
41 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
42 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
42 | WARNING | [ ] Line exceeds 85 characters; contains 131 characters
43 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
44 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
45 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
45 | ERROR | [x] TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
46 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
47 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
48 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
49 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
50 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
51 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
52 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
53 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
54 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
56 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
59 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 2
61 | ERROR | [ ] Missing @return tag in function comment
62 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
62 | ERROR | [x] Opening brace should be on a new line
63 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
64 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
66 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
67 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
68 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 6
69 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
70 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
70 | WARNING | [ ] Line exceeds 85 characters; contains 240 characters
71 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
73 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
76 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 2
76 | ERROR | [ ] Doc comment for parameter "$items" missing
76 | ERROR | [ ] Doc comment for parameter "$langcode" missing
78 | ERROR | [ ] Missing @return tag in function comment
79 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
79 | WARNING | [ ] Line exceeds 85 characters; contains 97 characters
79 | ERROR | [x] Opening brace should be on a new line
80 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
81 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
82 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
83 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 6
84 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 6
85 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
86 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
86 | ERROR | [ ] Expected "} else {\n"; found "}\n else {\n"
87 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 6
88 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 6
89 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
91 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
92 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
93 | ERROR | [x] Line indented incorrectly; expected at least 16 spaces, found 8
94 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
95 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
97 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
98 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
99 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 6
100 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
102 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
------------------------------------------------------------------------------------------------------------------------