Fix the issues reported by phpcs

Created on 29 May 2023, over 1 year ago
Updated 16 August 2024, 4 months ago

Problem/Motivation

FILE: ...html/contribution/drupal10/web/modules/contrib/encrypted_sqldump/README.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 82 characters
16 | WARNING | Line exceeds 80 characters; contains 101 characters
18 | WARNING | Line exceeds 80 characters; contains 110 characters
25 | WARNING | Line exceeds 80 characters; contains 170 characters
29 | WARNING | Line exceeds 80 characters; contains 99 characters
31 | WARNING | Line exceeds 80 characters; contains 107 characters
37 | WARNING | Line exceeds 80 characters; contains 102 characters
39 | WARNING | Line exceeds 80 characters; contains 103 characters
--------------------------------------------------------------------------------

FILE: ...drupal10/web/modules/contrib/encrypted_sqldump/src/Sql/SqlMySqlEncrypt.php
--------------------------------------------------------------------------------
FOUND 96 ERRORS AND 1 WARNING AFFECTING 83 LINES
--------------------------------------------------------------------------------
11 | ERROR | [x] Missing class doc comment
13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
16 | ERROR | [ ] Missing parameter type
19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
20 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
21 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
21 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
23 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
24 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
25 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL"
| | but found "null"
26 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
26 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL"
| | but found "null"
27 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
27 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL"
| | but found "null"
29 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
32 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
33 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
34 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
35 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
36 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
37 | ERROR | [x] Expected newline after closing brace
38 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
39 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
40 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
41 | ERROR | [x] Expected newline after closing brace
42 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
43 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Expected newline after closing brace
45 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
47 | ERROR | [x] Expected 1 blank line after function; 2 found
50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
50 | ERROR | [x] Missing function doc comment
51 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
53 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
54 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
57 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
58 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 5
59 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 5
60 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 5
61 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 5
62 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 5
63 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
63 | ERROR | [x] You must use "/**" style comments for a function comment
64 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
69 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
70 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
71 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
72 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
75 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
76 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
77 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
78 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
79 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
80 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
81 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
83 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
88 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
89 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
90 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
94 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL"
| | but found "null"
95 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
97 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
98 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
99 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
99 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
100 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
102 | ERROR | [x] Missing function doc comment
103 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
105 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
107 | ERROR | [x] Expected 1 blank line after function; 0 found
108 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 95 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...odules/contrib/encrypted_sqldump/src/Commands/EncryptedSqldumpCommands.php
--------------------------------------------------------------------------------
FOUND 33 ERRORS AND 2 WARNINGS AFFECTING 28 LINES
--------------------------------------------------------------------------------
3 | ERROR | [x] There must be one blank line after the namespace
| | declaration
24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
43 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
48 | ERROR | [x] There must be a single blank line after a tag group
53 | WARNING | [ ] Line exceeds 80 characters; contains 139 characters
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
55 | ERROR | [ ] The array declaration extends to column 257 (the limit is
| | 80). The array content should be split up over multiple
| | lines
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
56 | ERROR | [x] Opening brace should be on the same line as the declaration
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
58 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
59 | ERROR | [x] Expected newline after closing brace
60 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
61 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
62 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
63 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
65 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
68 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
69 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
69 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
70 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
71 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
75 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
76 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
78 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 32 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 347ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig encrypted_sqldump/

Remaining tasks

Patch Review

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @urvashi_vora
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi urvashi_vora,

    I reviewed patch coding-standard-fixes.patch, and there are still remaining errors/warning shown below:

    FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/encrypted_sqldump/README.md
    ----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------
     44 | WARNING | Line exceeds 80 characters; contains 102 characters
    ----------------------------------------------------------------------------------------------------------
    
    
    FILE: ...denttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/encrypted_sqldump/src/Commands/EncryptedSqldumpCommands.php
    --------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------
     55 | ERROR | The array declaration extends to column 255 (the limit is 80). The array content should be split up over multiple
        |       | lines
    --------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/encrypted_sqldump/src/Sql/SqlMySqlEncrypt.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------
     128 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    Time: 158ms; Memory: 10MB

    Please check.
    Thank You.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India mrinalini9 New Delhi

    Updated patch #1 by addressing #2, please review it.

    Thanks!

  • Hi, reviewed the patch applied cleanly but still found few minor errors/warnings.

  • Status changed to Needs work 4 months ago
  • 🇵🇭Philippines paraderojether
  • Merge request !23363348: Fix phpcs issues → (Open) created by paraderojether
  • Status changed to Needs review 4 months ago
  • 🇵🇭Philippines paraderojether

    I created MR to fix the remaining issues, please review.

    Thank you.

Production build 0.71.5 2024