Problem/Motivation

Module is not compitable to Drupal coding standard.

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:

Comments

ashutosh ahirwal’s picture

Ashutosh Ahirwal created an issue.

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/files_upload/

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\files_upload\files_upload.module
------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | ERROR | [x] Additional blank lines found at end of doc comment
9 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
15 | ERROR | [x] Expected 1 blank line before function; 2 found
16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
18 | ERROR | [x] No space found before comment text; expected "// dump($route_name);" but found "//dump($route_name);"
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\files_upload\src\Form\FilesUploadForm.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 106 ERRORS AND 1 WARNING AFFECTING 56 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
31 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
31 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
31 | ERROR | [x] Short array syntax must be used to define arrays
32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
32 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
32 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
33 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
33 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
34 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
34 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
34 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
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
38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
38 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
39 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
39 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
40 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
41 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
42 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
43 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
43 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
44 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
44 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
45 | 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
47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
54 | ERROR | [x] Expected 0 spaces between ")" and comma; 1 found
57 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
60 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
61 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
61 | ERROR | [x] Function comment short description must start with exactly one space
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
63 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
67 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
67 | 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] Spaces must be used for alignment; tabs are not allowed
68 | ERROR | [x] Function comment short description must start with exactly one space
69 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
70 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
70 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
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
80 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
81 | ERROR | [ ] The array declaration extends to column 113 (the limit is 80). The array content should be split up over multiple lines
81 | ERROR | [ ] The array declaration extends to column 104 (the limit is 80). The array content should be split up over multiple lines
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
88 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
88 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
88 | ERROR | [x] Missing function doc comment
88 | ERROR | [x] Expected 1 space before opening brace; found 0
90 | ERROR | [x] Short array syntax must be used to define arrays
91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
91 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
92 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
94 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
97 | ERROR | [x] Closing brace indented incorrectly; expected 1 spaces, found 2
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 104 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

Time: 313ms; Memory: 8MB

ashutosh ahirwal’s picture

Assigned: ashutosh ahirwal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.87 KB

Providing patch.
Need review.

Tauany Bueno’s picture

Assigned: Unassigned » Tauany Bueno

hi, i'll work on this :)

Tauany Bueno’s picture

Assigned: Tauany Bueno » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new11.11 KB
new2.09 KB

Hello!
I tested the patches, and it fixed all the issues... I still found some issues on phpcs (attached .txt), I can fix it you find it necessary. Also changed the approach to merge request for future revisions and tests.
Changing to RTBC because the main issue was fixed.

heni_deepak made their first commit to this issue’s fork.

  • heni_deepak committed 4a3107c on 1.0.x authored by tauanygb
    Issue #3291953 by tauanygb, Ashutosh Ahirwal, heni_deepak: Module is not...
heni_deepak’s picture

Status: Reviewed & tested by the community » Fixed

fixed, Thanks

Status: Fixed » Closed (fixed)

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