Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
FILE: ...reviewd/pareview_temp/zvjdbnwa/src/Form/BetterSearchSettingsForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
41 | WARNING | Only string literals should be passed to t() where
| | possible
--------------------------------------------------------------------------
FILE: /var/www/pareviewd/pareview_temp/zvjdbnwa/better_search.install
--------------------------------------------------------------------------
FOUND 16 ERRORS AND 1 WARNING AFFECTING 10 LINES
--------------------------------------------------------------------------
4 | ERROR | [x] The second line in the file doc comment must be
| | "@file"
4 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
5 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
5 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
5 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
6 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
6 | ERROR | [x] There must be no blank lines after the function
| | comment
9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
10 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
11 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
| | "TRUE" but found "true"
12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
12 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
| | "TRUE" but found "true"
13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
14 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
| | "TRUE" but found "true"
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /var/www/pareviewd/pareview_temp/zvjdbnwa/better_search.module
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
81 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
88 | ERROR | [x] Expected newline after closing brace
88 | ERROR | [x] Expected 1 space after ELSE keyword; 0 found
95 | ERROR | [x] Whitespace found at end of line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/www/pareviewd/pareview_temp/zvjdbnwa/css/background_fade.css
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
68 | ERROR | [x] Blank lines are not allowed in class definitions
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
Time: 232ms; Memory: 8MB
Proposed resolution
Comment | File | Size | Author |
---|---|---|---|
#4 | 3238785-4.patch | 267 bytes | yogeshmpawar |
#2 | 3238785-2.patch | 4.46 KB | yogeshmpawar |
Comments
Comment #2
yogeshmpawarAdding patch to resolve code sniffer issues detected in PAReview expect one warning in BetterSearchSettingsForm.php
Comment #4
yogeshmpawarAdding doc comment in .install file
Comment #6
yogeshmpawarCommitted & Pushed to 8.x-1.x branch.