Fix the issues reported by phpcs

Created on 8 July 2024, 6 months ago
Updated 30 July 2024, 5 months ago

Problem/Motivation

Running :-
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/ajax_login_register_modal/
returns the following warnings/errors, which should be fixed.

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.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: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.info.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.libraries.yml
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.links.task.yml
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
20 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 73 ERRORS AND 4 WARNINGS AFFECTING 64 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
5 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Ajax\OpenModalDialogCommand.
10 | ERROR | [x] When importing a class with "use", do not include a leading \
18 | ERROR | [x] Opening brace should be on the same line as the declaration
27 | ERROR | [ ] Missing short description in doc comment
30 | ERROR | [ ] Invalid function name, expected enable_ajax_on_form but found enableAjaxOnForm
30 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "enableAjaxOnForm" but expected "ajax_login_register_modal_enableAjaxOnForm"
31 | ERROR | [x] Opening brace should be on the same line as the declaration
32 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 30 spaces but found 2 spaces
33 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 20 spaces but found 1 space
34 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 23 spaces but found 1 space
35 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 17 spaces but found 1 space
40 | WARNING | [x] A comma should follow the last multiline array item. Found: 100
50 | ERROR | [x] Expected 1 space after "as"; 2 found
58 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
68 | ERROR | [x] Expected 1 space after "=>"; 2 found
75 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
78 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 29 spaces but found 6 spaces
79 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 29 spaces but found 6 spaces
80 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 29 spaces but found 6 spaces
84 | ERROR | [ ] Invalid function name, expected enabled_links but found enabledLinks
84 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "enabledLinks" but expected "ajax_login_register_modal_enabledLinks"
84 | ERROR | [x] Missing function doc comment
85 | ERROR | [x] Opening brace should be on the same line as the declaration
102 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
102 | ERROR | [x] Expected 1 space after "="; 2 found
103 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
103 | ERROR | [x] Expected 1 space after "="; 2 found
104 | ERROR | [x] Expected 1 space after "="; 2 found
105 | ERROR | [x] Expected 1 space after "="; 2 found
116 | ERROR | [x] Short array syntax must be used to define arrays
117 | WARNING | [x] A comma should follow the last multiline array item. Found: $attributes
120 | WARNING | [ ] Only string literals should be passed to t() where possible
123 | ERROR | [x] Expected 1 blank line after function; 0 found
128 | ERROR | [x] Opening brace should be on the same line as the declaration
133 | ERROR | [x] Expected newline after closing brace
143 | ERROR | [x] Opening brace should be on the same line as the declaration
144 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 12 spaces but found 2 spaces
147 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space
148 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 13 spaces but found 2 spaces
154 | ERROR | [x] Case breaking statements must be followed by a single blank line
159 | ERROR | [x] Case breaking statements must be followed by a single blank line
169 | ERROR | [x] Expected newline after closing brace
176 | ERROR | [x] Expected newline after closing brace
178 | ERROR | [x] Expected newline after closing brace
182 | ERROR | [x] Expected 1 blank line after function; 0 found
183 | ERROR | [ ] Invalid function name, expected open_modal_type but found openModalType
183 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "openModalType" but expected "ajax_login_register_modal_openModalType"
183 | ERROR | [x] Missing function doc comment
184 | ERROR | [x] Opening brace should be on the same line as the declaration
187 | ERROR | [x] Expected newline after closing brace
190 | ERROR | [x] Expected 1 blank line after function; 0 found
194 | ERROR | [ ] Invalid function name, expected get_links but found getLinks
194 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "getLinks" but expected "ajax_login_register_modal_getLinks"
194 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
195 | ERROR | [x] Opening brace should be on the same line as the declaration
205 | ERROR | [x] Expected 1 blank line after function; 0 found
206 | ERROR | [ ] Invalid function name, expected get_modal_options but found getModalOptions
206 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "getModalOptions" but expected "ajax_login_register_modal_getModalOptions"
206 | ERROR | [x] Missing function doc comment
207 | ERROR | [x] Opening brace should be on the same line as the declaration
208 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
210 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
210 | ERROR | [x] Expected 1 space after "="; 2 found
211 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
211 | ERROR | [x] Expected 1 space after "="; 2 found
212 | ERROR | [x] Expected 1 space after "="; 2 found
213 | ERROR | [x] Expected 1 space after "="; 2 found
220 | ERROR | [x] There must be no blank lines after the function comment
223 | ERROR | [x] Opening brace should be on the same line as the declaration
225 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
226 | WARNING | [ ] Unused variable $old_path.
227 | ERROR | [x] Concat operator must be surrounded by a single space
230 | ERROR | [x] No space found before comment text; expected "// dump($source);" but found "//dump($source);"
233 | ERROR | [x] Expected newline after closing brace
237 | ERROR | [x] No space found before comment text; expected "// $libraries['drupal.dialog']['js'][$path] = [];" but found "//$libraries['drupal.dialog']['js'][$path] = [];"
238 | ERROR | [x] No space found before comment text; expected "// $libraries['drupal.dialog']['js'] = $new_js;" but found "//$libraries['drupal.dialog']['js'] = $new_js;"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 64 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Ajax/ReloadCommand.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
13 | ERROR | [x] Opening brace should be on the same line as the declaration
19 | ERROR | [x] Opening brace should be on the same line as the declaration
23 | ERROR | [x] Expected 1 blank line after function; 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Plugin/Block/AjaxLoginRegisterModalBlock.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 20 ERRORS AND 2 WARNINGS AFFECTING 19 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Link.
7 | ERROR | [x] When importing a class with "use", do not include a leading \
12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
24 | ERROR | [x] Opening brace should be on the same line as the declaration
44 | ERROR | [x] Opening brace should be on the same line as the declaration
54 | ERROR | [x] Opening brace should be on the same line as the declaration
62 | ERROR | [x] Expected 1 blank line after function; 0 found
67 | ERROR | [x] Opening brace should be on the same line as the declaration
68 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
81 | ERROR | [x] No space found before comment text; expected "// $modal_option = getModalOptions($enabled_link);" but found "//$modal_option = getModalOptions($enabled_link);"
89 | ERROR | [x] Expected newline after closing brace
93 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
93 | ERROR | [x] Expected 1 space after "="; 2 found
94 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
94 | ERROR | [x] Expected 1 space after "="; 2 found
95 | ERROR | [x] Expected 1 space after "="; 2 found
96 | ERROR | [x] Expected 1 space after "="; 2 found
99 | ERROR | [x] Short array syntax must be used to define arrays
100 | WARNING | [x] A comma should follow the last multiline array item. Found: $attributes
103 | WARNING | [ ] Only string literals should be passed to t() where possible
106 | ERROR | [x] Expected newline after closing brace
112 | ERROR | [x] Expected 1 blank line after function; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Form/BlockConfigForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 4 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\UrlHelper.
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
22 | ERROR | [x] Opening brace should be on the same line as the declaration
28 | WARNING | [ ] Possible useless method overriding detected
28 | ERROR | [x] Expected 1 blank line before function; 2 found
29 | ERROR | [x] Opening brace should be on the same line as the declaration
37 | ERROR | [x] Opening brace should be on the same line as the declaration
41 | ERROR | [x] Expected 1 blank line after function; 0 found
46 | ERROR | [x] Opening brace should be on the same line as the declaration
56 | ERROR | [x] Opening brace should be on the same line as the declaration
64 | ERROR | [x] Opening brace should be on the same line as the declaration
76 | ERROR | [ ] The array declaration extends to column 122 (the limit is 120). The array content should be split up over multiple lines
76 | ERROR | [x] Short array syntax must be used to define arrays
143 | WARNING | [ ] Possible useless method overriding detected
144 | ERROR | [x] Opening brace should be on the same line as the declaration
152 | ERROR | [x] Opening brace should be on the same line as the declaration
160 | ERROR | [x] Expected 1 blank line after function; 0 found
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Form/PasswordResetConfigForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 26 ERRORS AND 5 WARNINGS AFFECTING 30 LINES
--------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\UrlHelper.
22 | ERROR | [x] Opening brace should be on the same line as the declaration
27 | WARNING | [ ] Possible useless method overriding detected
28 | ERROR | [x] Opening brace should be on the same line as the declaration
36 | ERROR | [x] Opening brace should be on the same line as the declaration
40 | ERROR | [x] Expected 1 blank line after function; 0 found
45 | ERROR | [x] Opening brace should be on the same line as the declaration
55 | ERROR | [x] Opening brace should be on the same line as the declaration
63 | ERROR | [x] Opening brace should be on the same line as the declaration
72 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 30 spaces but found 1 space
74 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
77 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 17 spaces but found 1 space
82 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 30 spaces but found 1 space
88 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 29 spaces but found 1 space
94 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 16 spaces but found 1 space
99 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 23 spaces but found 1 space
104 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 23 spaces but found 1 space
109 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 21 spaces but found 1 space
114 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 35 spaces but found 24 spaces
118 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 8 spaces but found 4 spaces
123 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 11 spaces but found 4 spaces
128 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 32 spaces but found 1 space
132 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 69 spaces but found 1 space
135 | WARNING | [x] A comma should follow the last multiline array item. Found: )
143 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
160 | WARNING | [ ] Possible useless method overriding detected
161 | ERROR | [x] Opening brace should be on the same line as the declaration
169 | ERROR | [x] Opening brace should be on the same line as the declaration
177 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Form/LoginConfigForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 27 ERRORS AND 6 WARNINGS AFFECTING 32 LINES
--------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\UrlHelper.
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
22 | ERROR | [x] Opening brace should be on the same line as the declaration
27 | WARNING | [ ] Possible useless method overriding detected
28 | ERROR | [x] Opening brace should be on the same line as the declaration
36 | ERROR | [x] Opening brace should be on the same line as the declaration
40 | ERROR | [x] Expected 1 blank line after function; 0 found
45 | ERROR | [x] Opening brace should be on the same line as the declaration
55 | ERROR | [x] Opening brace should be on the same line as the declaration
63 | ERROR | [x] Opening brace should be on the same line as the declaration
66 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 56 spaces but found 1 space
71 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 35 spaces but found 1 space
73 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
76 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 17 spaces but found 1 space
81 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 35 spaces but found 1 space
87 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 34 spaces but found 1 space
93 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 21 spaces but found 1 space
98 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 23 spaces but found 1 space
103 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 23 spaces but found 1 space
108 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 21 spaces but found 1 space
113 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 41 spaces but found 24 spaces
117 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 8 spaces but found 4 spaces
122 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 12 spaces but found 4 spaces
127 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 38 spaces but found 1 space
131 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 76 spaces but found 1 space
134 | WARNING | [x] A comma should follow the last multiline array item. Found: )
142 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
159 | WARNING | [ ] Possible useless method overriding detected
160 | ERROR | [x] Opening brace should be on the same line as the declaration
168 | ERROR | [x] Opening brace should be on the same line as the declaration
176 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 29 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/src/Form/RegisterConfigForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 37 ERRORS AND 5 WARNINGS AFFECTING 41 LINES
--------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\UrlHelper.
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
22 | ERROR | [x] Opening brace should be on the same line as the declaration
27 | WARNING | [ ] Possible useless method overriding detected
28 | ERROR | [x] Opening brace should be on the same line as the declaration
36 | ERROR | [x] Opening brace should be on the same line as the declaration
40 | ERROR | [x] Expected 1 blank line after function; 0 found
45 | ERROR | [x] Opening brace should be on the same line as the declaration
55 | ERROR | [x] Opening brace should be on the same line as the declaration
63 | ERROR | [x] Opening brace should be on the same line as the declaration
64 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 73 spaces but found 1 space
65 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 49 spaces but found 1 space
70 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 25 spaces but found 1 space
76 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
81 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 25 spaces but found 1 space
88 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 24 spaces but found 1 space
95 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space
100 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 13 spaces but found 1 space
106 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 13 spaces but found 1 space
111 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 11 spaces but found 1 space
116 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 34 spaces but found 24 spaces
120 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 4 spaces
126 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 12 spaces but found 4 spaces
131 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 41 spaces but found 1 space
135 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 82 spaces but found 1 space
138 | WARNING | [x] A comma should follow the last multiline array item. Found: )
146 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
163 | WARNING | [ ] Possible useless method overriding detected
164 | ERROR | [x] Opening brace should be on the same line as the declaration
172 | ERROR | [x] Opening brace should be on the same line as the declaration
180 | ERROR | [x] Expected 1 blank line after function; 0 found
181 | ERROR | [x] Missing function doc comment
182 | ERROR | [x] Opening brace should be on the same line as the declaration
184 | ERROR | [x] Expected 1 blank line after function; 0 found
185 | ERROR | [x] Missing function doc comment
186 | ERROR | [x] Opening brace should be on the same line as the declaration
188 | ERROR | [x] Expected 1 blank line after function; 0 found
189 | ERROR | [x] Missing function doc comment
190 | ERROR | [x] Opening brace should be on the same line as the declaration
192 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/js/dialog-alter.js
---------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Additional whitespace found at start of file
7 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
12 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
18 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
43 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
50 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /home/prem/Documents/drupal-10.3.1/web/modules/contrib/ajax_login_register_modal/config/install/ajax_login_register_modal.settings.yml
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
47 | ERROR | [x] Expected 1 newline at end of file; 4 found
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

Time: 304ms; Memory: 12MB

šŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

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 @prem suthar
  • Assigned to gaurav gupta
  • Merge request !1Issue #3459971: Fix phpcs error. ā†’ (Merged) created by gaurav gupta
  • Issue was unassigned.
  • Status changed to Needs review 6 months ago
  • Status changed to Needs work 6 months ago
  • šŸ‡®šŸ‡³India bhaveshdas

    I applied MR!1 and I still encountered some issues after I ran vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/custom/ajax_login_register_modal-3459971/

    FILE: /var/www/html/drupal-contri-d10/modules/custom/ajax_login_register_modal-3459971/js/dialog-alter.js
    ---------------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 8 LINES
    ---------------------------------------------------------------------------------------------------------
      1 | ERROR | [x] Additional whitespace found at start of file
      7 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     12 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
     18 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
     35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     43 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
     50 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ---------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------
    
    Time: 244ms; Memory: 12MB
    
  • Status changed to Needs review 6 months ago
  • gaurav gupta Jaipur, Rajasthsan

    Hi @bhaveshdas,
    i have made the changes.
    Thanks

  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @Gaurav Gupta,

    I applied MR!1 and it fixes the phpcs issues.

    āžœ  ajax_login_register_modal git:(main) āœ— curl https://git.drupalcode.org/project/ajax_login_register_modal/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 52423    0 52423    0     0  80870      0 --:--:-- --:--:-- --:--:-- 80899
    patching file ajax_login_register_modal.info.yml
    Hunk #1 FAILED at 3.
    1 out of 1 hunk FAILED -- saving rejects to file ajax_login_register_modal.info.yml.rej
    patching file ajax_login_register_modal.libraries.yml
    patching file ajax_login_register_modal.links.menu.yml
    patching file ajax_login_register_modal.links.task.yml
    patching file ajax_login_register_modal.module
    patching file config/install/ajax_login_register_modal.settings.yml
    patching file js/dialog-alter.js
    patching file src/Ajax/ReloadCommand.php
    patching file src/Form/BlockConfigForm.php
    patching file src/Form/LoginConfigForm.php
    patching file src/Form/PasswordResetConfigForm.php
    patching file src/Form/RegisterConfigForm.php
    patching file src/Plugin/Block/AjaxLoginRegisterModalBlock.php
    āžœ  ajax_login_register_modal git:(main) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ajax_login_register_modal
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/ajax_login_register_modal/ajax_login_register_modal.info.yml
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
     1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
     1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
    ---------------------------------------------------------------------------------------------------------------------------------
    
    Time: 309ms; Memory: 10MB
    
    āžœ  contrib git:(main) āœ—

    Thank you.

  • Status changed to Fixed 5 months ago
  • šŸ‡®šŸ‡³India pappuksingh Mumbai
  • šŸ‡®šŸ‡³India bhaveshdas

    Hey @pappuksingh,

    When you move an issue to the "Fixed" state, please remember to give credit to the contributors.

  • šŸ‡®šŸ‡³India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024