Problem/Motivation

$ phpcs --standard=drupal message_time

FILE: D:\xammp1\htdocs\drupal9\d9\web\modules\message_time\js\message_time.js
--------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
2 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
3 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
5 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
6 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
6 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
6 | ERROR | [x] Whitespace found at end of line
7 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
8 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
9 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
10 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
10 | ERROR | [x] Whitespace found at end of line
11 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
13 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...s\drupal9\d9\web\modules\message_time\src\Form\MessageTimeSettingsForm.php
--------------------------------------------------------------------------------
FOUND 135 ERRORS AND 2 WARNINGS AFFECTING 66 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin
| | with a file doc comment
5 | ERROR | [x] Doc comment short description must end with a full stop
14 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
14 | ERROR | [x] Function comment short description must start with exactly
| | one space
14 | ERROR | [x] Doc comment short description must end with a full stop
15 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
15 | ERROR | [x] There must be exactly one blank line before the tags in a
| | doc comment
16 | WARNING | [ ] The class short comment should describe what the class does
| | and not simply repeat the class name
19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
20 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
20 | ERROR | [x] Function comment short description must start with exactly
| | one space
21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
26 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
27 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
27 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
27 | ERROR | [x] Function comment short description must start with exactly
| | one space
28 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
29 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
30 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
31 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
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] Spaces must be used for alignment; tabs are not allowed
34 | ERROR | [x] Function comment short description must start with exactly
| | one space
35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
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
37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
39 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
40 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
40 | ERROR | [x] Short array syntax must be used to define arrays
41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
41 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 3
41 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
42 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 3
42 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
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
46 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
46 | ERROR | [x] Short array syntax must be used to define arrays
47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
50 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | )
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
53 | ERROR | [x] Short array syntax must be used to define arrays
54 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
54 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 3
54 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
55 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces,
| | found 3
55 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
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
59 | ERROR | [x] Short array syntax must be used to define arrays
60 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
60 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
60 | ERROR | [x] Short array syntax must be used to define arrays
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
62 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
63 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
68 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
68 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
69 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
69 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
69 | ERROR | [x] Function comment short description must start with exactly
| | one space
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 2 spaces, found 1
72 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
72 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
73 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
73 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
74 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
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
77 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
77 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
78 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
78 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
78 | ERROR | [x] Function comment short description must start with exactly
| | one space
79 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
80 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
80 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
81 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
81 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
82 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
82 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
82 | ERROR | [x] Object operator not indented correctly; expected 4 spaces
| | but found 3
83 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
83 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
84 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
84 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
85 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
85 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
86 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
86 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
86 | ERROR | [x] Expected 1 blank line after function; 0 found
87 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 136 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

CommentFileSizeAuthor
#2 3329951-2.patch5.51 KBJitendra_Kumar
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 8.0.x Comparecompare

Comments

Jitendra_Kumar created an issue. See original summary.

Jitendra_Kumar’s picture

Assigned: Jitendra_Kumar » Unassigned
Status: Active » Needs review
StatusFileSize
new5.51 KB

Please review this patch
Thanks

shubham rathore’s picture

Assigned: Unassigned » shubham rathore
shubham rathore’s picture

Assigned: shubham rathore » Unassigned
Status: Needs review » Reviewed & tested by the community

Hi Patch #2 apply successfully on drupal 9.5.x-dev.
Result:-All error/warnings are clear.
Thank you.

dheeraj jhamtani’s picture

Hi @Jitendra_Kumar Patch #2 working perfectly.

heni_deepak’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.