Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/referenced_term_formatter/referenced_term_formatter.module
------------------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 13 LINES
------------------------------------------------------------------------------------------
14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
16 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
16 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
17 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
18 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
36 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
36 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 2
37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
37 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 2
53 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
53 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 2
54 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
54 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 2
74 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
75 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
76 | ERROR | [x] Expected 1 newline at end of file; 0 found
FILE: /var/www/html/modules/contrib/referenced_term_formatter/README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 11 WARNINGS AFFECTING 11 LINES
------------------------------------------------------------------------
4 | WARNING | [ ] Line exceeds 80 characters; contains 374 characters
10 | WARNING | [ ] Line exceeds 80 characters; contains 270 characters
13 | WARNING | [ ] Line exceeds 80 characters; contains 136 characters
16 | WARNING | [ ] Line exceeds 80 characters; contains 131 characters
22 | WARNING | [ ] Line exceeds 80 characters; contains 142 characters
25 | WARNING | [ ] Line exceeds 80 characters; contains 115 characters
28 | WARNING | [ ] Line exceeds 80 characters; contains 119 characters
34 | WARNING | [ ] Line exceeds 80 characters; contains 109 characters
37 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
40 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
43 | WARNING | [ ] Line exceeds 80 characters; contains 190 characters
43 | ERROR | [x] Expected 1 newline at end of file; 0 found
FILE: /var/www/html/modules/contrib/referenced_term_formatter/src/Plugin/Field/FieldFormatter/SeparatedTermsFormatter.php
-----------------------------------------------------------------------------------------------------------------
FOUND 240 ERRORS AND 2 WARNINGS AFFECTING 116 LINES
-----------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
8 | ERROR | [x] There must be one blank line after the namespace declaration
30 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
31 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
34 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
36 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
39 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
43 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
43 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
43 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
44 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
44 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
44 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
44 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
45 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
45 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
45 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
46 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
51 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
52 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
52 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
53 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
53 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
56 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
56 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
56 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
57 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
57 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
57 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
58 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
58 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
58 | ERROR | [x] Short array syntax must be used to define arrays
59 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
59 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
60 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
60 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
61 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
62 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
62 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
63 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
63 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
64 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
64 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
67 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
68 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
68 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
68 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
69 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
69 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
69 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
70 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
71 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
71 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
72 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
72 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
72 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
73 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
73 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
73 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
74 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
74 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
74 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
75 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
75 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
75 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
76 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
77 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
78 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
78 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
78 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
79 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
79 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
79 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
80 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
80 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
80 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
81 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
81 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
81 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
82 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
84 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
85 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
85 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
87 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
87 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
88 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
89 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
96 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
96 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
96 | ERROR | [x] Array indentation error, expected 5 spaces but found 3
97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
97 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
97 | ERROR | [x] Array indentation error, expected 5 spaces but found 3
98 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
98 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
98 | ERROR | [x] Array indentation error, expected 5 spaces but found 3
99 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
99 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 2
101 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
101 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
102 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
104 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
105 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
106 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
107 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
108 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
108 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
110 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
110 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
111 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
111 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
112 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
114 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
114 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
115 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
115 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
116 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
116 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
117 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
117 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 5
117 | WARNING | [ ] Term::load calls should be avoided in classes, use dependency injection instead
118 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
118 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 5
120 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
120 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
122 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
122 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
123 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
123 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
123 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
125 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
125 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
125 | ERROR | [x] Short array syntax must be used to define arrays
127 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
127 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
128 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
128 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
129 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
129 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 7
130 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
130 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 8
131 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
131 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 9
133 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
133 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
134 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
134 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
136 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
136 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
137 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
139 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
139 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
140 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
140 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
141 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
141 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 9
141 | ERROR | [x] Expected newline after closing brace
142 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
142 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
143 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
143 | ERROR | [x] Line indented incorrectly; expected 20 spaces, found 10
144 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
144 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 9
145 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
145 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 8
145 | ERROR | [x] Expected newline after closing brace
146 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
146 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 9
147 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
147 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 8
148 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
148 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 8
149 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
149 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 7
150 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
150 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
152 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
152 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
153 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
153 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
155 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
155 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
156 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
156 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
158 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
158 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 6
158 | ERROR | [x] Short array syntax must be used to define arrays
159 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
159 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces, found 7
159 | ERROR | [x] Array indentation error, expected 8 spaces but found 7
160 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
161 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
161 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 5
162 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
162 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
163 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
163 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
164 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
164 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
166 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
166 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
167 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
167 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/referenced_term_formatter/
Proposed resolution
Above error/warnings need to be fixed.