as mentioned in #2888655: Raw password in config there are several code standard issues:
Review of the 8.x-2.x branch (commit 96df933):
- Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
- The REQUIREMENTS section is missing.
- The CONFIGURATION section is missing.
- Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
- Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
- DrupalPractice has found some issues with your code, but could be false positives.
FILE: ...endor/drupal/pareviewsh/pareview_temp/src/JiraRestWrapperService.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
23 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
70 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
--------------------------------------------------------------------------
FILE: ...rupal/pareviewsh/pareview_temp/src/Controller/JiraRestController.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
65 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
70 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
--------------------------------------------------------------------------
FILE: ...ndor/drupal/pareviewsh/pareview_temp/src/Form/JiraRestConfigForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------
37 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
39 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
45 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
47 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
52 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
54 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
59 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
62 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
68 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
71 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
--------------------------------------------------------------------------
FILE: ...w_temp/tests/src/Unit/JiraRestController/JiraRestSearchIssueTest.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
40 | WARNING | Unused variable $jr_service.
--------------------------------------------------------------------------
Time: 200ms; Memory: 4Mb
This automated report was generated with PAReview.sh, your friendly project application review script.
FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.links.menu.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...site1101/web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.module
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
15 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
16 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...00000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.txt
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------
24 | WARNING | Line exceeds 80 characters; contains 95 characters
26 | WARNING | Line exceeds 80 characters; contains 183 characters
36 | WARNING | Line exceeds 80 characters; contains 87 characters
48 | WARNING | Line exceeds 80 characters; contains 82 characters
70 | WARNING | Line exceeds 80 characters; contains 129 characters
83 | WARNING | Line exceeds 80 characters; contains 99 characters
90 | WARNING | Line exceeds 80 characters; contains 83 characters
--------------------------------------------------------------------------
FILE: ...01/web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.services.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
3 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...rupal/pareviewsh/pareview_temp/config/install/jira_rest.settings.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...endor/drupal/pareviewsh/pareview_temp/src/JiraRestWrapperService.php
--------------------------------------------------------------------------
FOUND 41 ERRORS AND 5 WARNINGS AFFECTING 34 LINES
--------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
13 | ERROR | [x] Missing class doc comment
15 | ERROR | [ ] Missing short description in doc comment
20 | ERROR | [x] Visibility must be declared on method "__construct"
20 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] No space found before comment text; expected "//
| | current credentials and url coming from drupal
| | config form" but found "//current credentials and
| | url coming from drupal config form"
22 | ERROR | [x] Inline comments must start with a capital letter
22 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
25 | ERROR | [x] Short array syntax must be used to define arrays
27 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
30 | ERROR | [x] Namespaced classes/interfaces/traits should be
| | referenced with use statements
31 | ERROR | [x] Namespaced classes/interfaces/traits should be
| | referenced with use statements
32 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
36 | ERROR | [ ] Missing short description in doc comment
37 | ERROR | [ ] Description for the @return value is missing
43 | WARNING | [ ] Line exceeds 80 characters; contains 111 characters
43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 0
43 | ERROR | [x] No space found before comment text; expected "//
| | EXPERIMENTAL, will probably change, this will later
| | be included as a function of
| | \biologis\JIRA_PHP_API\Issue" but found
| | "//EXPERIMENTAL, will probably change, this will
| | later be included as a function of
| | \biologis\JIRA_PHP_API\Issue"
43 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
44 | ERROR | [ ] Missing short description in doc comment
44 | ERROR | [ ] Parameter $file_path is not described in comment
44 | ERROR | [ ] Parameter $issuekey is not described in comment
45 | ERROR | [ ] Missing parameter comment
45 | ERROR | [ ] Doc comment for parameter $path does not match
| | actual variable name $issuekey
46 | ERROR | [ ] Missing parameter comment
46 | ERROR | [ ] Doc comment for parameter $data does not match
| | actual variable name $issuekey
47 | ERROR | [ ] Description for the @return value is missing
49 | ERROR | [x] Expected 1 blank line before function; 0 found
51 | ERROR | [x] Concat operator must be surrounded by a single space
62 | ERROR | [x] Short array syntax must be used to define arrays
64 | ERROR | [x] Short array syntax must be used to define arrays
66 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
69 | ERROR | [x] No space found before comment text; expected "//
| | current credentials and url coming from drupal
| | config form" but found "//current credentials and
| | url coming from drupal config form"
69 | ERROR | [x] Inline comments must start with a capital letter
69 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
72 | ERROR | [x] Short array syntax must be used to define arrays
73 | ERROR | [x] Short array syntax must be used to define arrays
75 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
76 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
78 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
93 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
| | "FALSE" but found "false"
95 | ERROR | [x] Expected newline after closing brace
96 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
| | "FALSE" but found "false"
99 | ERROR | [x] Expected 1 blank line after function; 3 found
102 | ERROR | [ ] More than 2 empty lines are not allowed
103 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 33 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...rupal/pareviewsh/pareview_temp/src/Controller/JiraRestController.php
--------------------------------------------------------------------------
FOUND 25 ERRORS AND 3 WARNINGS AFFECTING 22 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
6 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
9 | ERROR | [x] There must be one blank line after the namespace
| | declaration
12 | WARNING | [x] Unused use statement
18 | WARNING | [x] Unused use statement
18 | ERROR | [x] There must be one blank line after the last USE
| | statement; 2 found;
26 | ERROR | [ ] Missing short description in doc comment
50 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
50 | ERROR | [x] Function comment short description must start with
| | exactly one space
50 | ERROR | [x] Doc comment short description must start with a
| | capital letter
55 | ERROR | [x] Inline comments must start with a capital letter
55 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
58 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
63 | ERROR | [x] Expected 1 space after IF keyword; 0 found
63 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
64 | ERROR | [x] Short array syntax must be used to define arrays
65 | ERROR | [ ] Concatenating translatable strings is not allowed,
| | use placeholders instead and only one string literal
69 | ERROR | [x] Short array syntax must be used to define arrays
73 | ERROR | [x] Expected 1 blank line after function; 0 found
74 | ERROR | [x] Expected 1 newline at end of file; 9 found
74 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
77 | ERROR | [ ] More than 2 empty lines are not allowed
78 | ERROR | [ ] More than 2 empty lines are not allowed
79 | ERROR | [ ] More than 2 empty lines are not allowed
80 | ERROR | [ ] More than 2 empty lines are not allowed
81 | ERROR | [ ] More than 2 empty lines are not allowed
82 | ERROR | [ ] More than 2 empty lines are not allowed
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 18 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...web/vendor/drupal/pareviewsh/pareview_temp/src/JiraRestException.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------
7 | ERROR | [x] Missing class doc comment
7 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...ndor/drupal/pareviewsh/pareview_temp/src/Form/JiraRestConfigForm.php
--------------------------------------------------------------------------
FOUND 41 ERRORS AFFECTING 34 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
| | line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
8 | ERROR | [ ] More than 2 empty lines are not allowed
9 | ERROR | [x] There must be one blank line after the namespace
| | declaration
13 | ERROR | [x] There must be one blank line after the last USE
| | statement; 2 found;
16 | ERROR | [x] Missing class doc comment
26 | ERROR | [ ] Doc comment short description must start with a
| | capital letter
33 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
35 | ERROR | [x] Short array syntax must be used to define arrays
43 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
60 | ERROR | [x] Expected 1 space after "=>"; 0 found
66 | ERROR | [x] Short array syntax must be used to define arrays
69 | ERROR | [x] Expected 1 space after "=>"; 0 found
74 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 3 empty lines
76 | ERROR | [ ] More than 2 empty lines are not allowed
83 | ERROR | [x] Expected one space after the comma, 2 found
83 | ERROR | [x] Expected 1 space between comma and type hint
| | "FormStateInterface"; 2 found
88 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
95 | ERROR | [x] Expected 1 space after IF keyword; 0 found
99 | ERROR | [x] Expected 1 space after IF keyword; 0 found
103 | ERROR | [x] No space found before comment text; expected "// CHECK
| | may not be needed for d8, unsets userdata if username
| | left empty" but found "//CHECK may not be needed for
| | d8, unsets userdata if username left empty"
103 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
120 | ERROR | [x] Expected one space after the comma, 0 found
121 | ERROR | [x] Expected one space after the comma, 0 found
122 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
122 | ERROR | [x] Inline control structures are not allowed
122 | ERROR | [x] Expected 1 space after IF keyword; 0 found
122 | ERROR | [x] Expected one space after the comma, 0 found
123 | ERROR | [x] Expected one space after the comma, 0 found
124 | ERROR | [x] Expected one space after the comma, 0 found
129 | ERROR | [x] Expected 1 blank line after function; 2 found
133 | ERROR | [x] Doc comment star missing
134 | ERROR | [x] Doc comment short description must be on the first
| | line
135 | ERROR | [x] Doc comment star missing
136 | ERROR | [x] Additional blank lines found at end of doc comment
136 | ERROR | [x] There must be no blank lines after the function
| | comment
146 | ERROR | [x] Expected 1 blank line after function; 0 found
147 | ERROR | [x] Expected 1 newline at end of file; 2 found
147 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 38 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...ite1101/web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.install
--------------------------------------------------------------------------
FOUND 13 ERRORS AND 1 WARNING AFFECTING 14 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
5 | ERROR | [x] There must be exactly one blank line after the file
| | comment
9 | ERROR | [x] Expected 1 blank line before function; 0 found
10 | ERROR | [x] Short array syntax must be used to define arrays
15 | ERROR | [x] Short array syntax must be used to define arrays
17 | ERROR | [x] Expected 1 space after "=>"; 2 found
18 | ERROR | [x] Expected 1 space after "=>"; 2 found
20 | ERROR | [x] Case breaking statements must be followed by a single
| | blank line
22 | ERROR | [x] There should be no white space after an opening "("
23 | ERROR | [x] Short array syntax must be used to define arrays
25 | ERROR | [x] There should be no white space before a closing ")"
30 | ERROR | [x] Short array syntax must be used to define arrays
32 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: REQUIREMENT_OK
39 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...101/web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.routing.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 newline at end of file; 3 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...w_temp/tests/src/Unit/JiraRestController/JiraRestSearchIssueTest.php
--------------------------------------------------------------------------
FOUND 19 ERRORS AND 3 WARNINGS AFFECTING 18 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
6 | ERROR | [x] Doc comment short description must end with a full
| | stop
6 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
11 | WARNING | [x] Unused use statement
12 | ERROR | [x] There must be one blank line after the last USE
| | statement; 2 found;
20 | ERROR | [ ] Missing short description in doc comment
23 | ERROR | [ ] Class property $jira_rest_controller should use
| | lowerCamel naming without underscores
29 | ERROR | [x] Expected 1 blank line before function; 2 found
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
47 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
49 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
51 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 0
52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
52 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
53 | ERROR | [x] Expected one space after the comma, 0 found
54 | ERROR | [x] Expected 1 blank line after function; 3 found
57 | ERROR | [ ] More than 2 empty lines are not allowed
58 | ERROR | [x] Expected 1 newline at end of file; 2 found
58 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/jira_rest.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 5 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
Time: 427ms; Memory: 4Mb
Comments
Comment #2
pookmish commentedComment #4
veerabhadra commentedThis patch removes all the warnings.
Comment #5
pookmish commentedPatch does not use correct code standards
Comment #6
baliram.patil commentedThis patch follow Drupal coding standards and DrupalPractice.
Comment #7
pookmish commentedPatch failed to applly to 8.x-3.x
Comment #8
baliram.patil commentedUpdated patch for 8.x-3.x version.
Comment #9
pookmish commentedWorking now. PHPCS shows no warnings.
Comment #10
knyshuk.vova commentedThe patch looks good and applies successfully. +1 for RTBC.
Comment #13
japerryFixed!