Fix the issues reported by phpcs

Created on 9 May 2023, over 1 year ago
Updated 20 August 2024, 3 months ago

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

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.routing.yml
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access
| | administration pages" which is about viewing but not changing configurations.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/QueueWorker/UserSyncQueue.php
--------------------------------------------------------------------------------------------------------------
FOUND 48 ERRORS AND 3 WARNINGS AFFECTING 29 LINES
--------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
10 | WARNING | [x] Unused use statement
24 | ERROR | [ ] Missing member variable doc comment
24 | ERROR | [x] The var keyword must not be used to declare a property
24 | ERROR | [ ] Visibility must be declared on property "$config"
25 | ERROR | [ ] Missing member variable doc comment
25 | ERROR | [x] The var keyword must not be used to declare a property
25 | ERROR | [ ] Visibility must be declared on property "$queue"
26 | ERROR | [ ] Missing member variable doc comment
26 | ERROR | [x] The var keyword must not be used to declare a property
26 | ERROR | [ ] Visibility must be declared on property "$core"
27 | ERROR | [ ] Missing member variable doc comment
27 | ERROR | [x] The var keyword must not be used to declare a property
27 | ERROR | [ ] Visibility must be declared on property "$userSyncManager"
33 | ERROR | [x] Expected 1 space before "="; 0 found
33 | ERROR | [x] Expected 1 space after "="; 0 found
39 | ERROR | [ ] Missing short description in doc comment
40 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
40 | ERROR | [ ] Description for the @return value is missing
42 | ERROR | [x] Expected 1 space before opening brace; found 0
45 | WARNING | [ ] Unused variable $email.
46 | WARNING | [ ] Unused variable $name.
49 | ERROR | [x] Expected one space after the comma, 0 found
49 | ERROR | [x] Expected one space after the comma, 0 found
49 | ERROR | [x] Expected one space after the comma, 0 found
49 | ERROR | [x] Expected 1 space between "'name'" and double arrow; 0 found
49 | ERROR | [x] Expected 1 space between double arrow and "$messagedef"; 0 found
49 | ERROR | [x] Expected 1 space before "=>"; 0 found
49 | ERROR | [x] Expected 1 space after "=>"; 0 found
51 | ERROR | [x] Expected 1 space after IF keyword; 0 found
51 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
52 | ERROR | [x] Concat operator must be surrounded by a single space
52 | ERROR | [x] Expected one space after the comma, 0 found
55 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
58 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
58 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
64 | ERROR | [x] Expected 1 space between comma and "$data"; 0 found
64 | ERROR | [x] Expected one space after the comma, 0 found
68 | ERROR | [ ] Missing short description in doc comment
69 | ERROR | [ ] Missing parameter comment
69 | ERROR | [ ] Missing parameter type
71 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
71 | ERROR | [ ] Description for the @return value is missing
73 | ERROR | [x] Expected 1 space before opening brace; found 0
75 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
86 | ERROR | [x] There must be no space before the colon in a CASE statement
88 | ERROR | [x] Case breaking statements must be followed by a single blank line
89 | ERROR | [x] There must be no space before the colon in a CASE statement
91 | ERROR | [x] Case breaking statements must be followed by a single blank line
94 | ERROR | [x] Expected newline after closing brace
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 32 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessorInterface.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 47 ERRORS AFFECTING 27 LINES
----------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
21 | ERROR | [ ] Missing parameter comment
21 | ERROR | [ ] Missing parameter type
22 | ERROR | [ ] Missing parameter comment
22 | ERROR | [ ] Missing parameter type
23 | ERROR | [ ] Missing parameter comment
25 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
25 | ERROR | [ ] Description for the @return value is missing
32 | ERROR | [ ] Missing parameter comment
33 | ERROR | [ ] Missing parameter comment
34 | ERROR | [ ] Missing parameter comment
35 | ERROR | [ ] Missing parameter comment
36 | ERROR | [ ] Missing parameter comment
38 | ERROR | [ ] Description for the @return value is missing
40 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
40 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
40 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
40 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
45 | ERROR | [ ] Missing parameter comment
46 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter comment
48 | ERROR | [ ] Missing parameter comment
49 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
51 | ERROR | [ ] Description for the @return value is missing
53 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
53 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
53 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
53 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
53 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
53 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
58 | ERROR | [ ] Missing parameter comment
59 | ERROR | [ ] Missing parameter comment
60 | ERROR | [ ] Missing parameter comment
61 | ERROR | [ ] Missing parameter comment
62 | ERROR | [ ] Missing parameter comment
64 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
64 | ERROR | [ ] Description for the @return value is missing
66 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
66 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
66 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
66 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
66 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
66 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessorBase.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 64 ERRORS AND 3 WARNINGS AFFECTING 38 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
20 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [ ] Missing short description in doc comment
34 | ERROR | [x] Missing function doc comment
68 | ERROR | [ ] Missing parameter comment
68 | ERROR | [ ] Missing parameter type
69 | ERROR | [ ] Missing parameter comment
69 | ERROR | [ ] Missing parameter type
70 | ERROR | [ ] Missing parameter comment
72 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
72 | ERROR | [ ] Description for the @return value is missing
79 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
81 | ERROR | [ ] Missing parameter comment
82 | ERROR | [ ] Missing parameter comment
83 | ERROR | [ ] Missing parameter comment
84 | ERROR | [ ] Missing parameter comment
85 | ERROR | [ ] Missing parameter comment
87 | ERROR | [ ] Description for the @return value is missing
89 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
89 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
89 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
89 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
89 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
89 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
96 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
98 | ERROR | [ ] Missing parameter comment
99 | ERROR | [ ] Missing parameter comment
100 | ERROR | [ ] Missing parameter comment
101 | ERROR | [ ] Missing parameter comment
102 | ERROR | [ ] Missing parameter comment
104 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
104 | ERROR | [ ] Description for the @return value is missing
106 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
106 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
106 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
106 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
106 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
106 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
113 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
115 | ERROR | [ ] Missing parameter comment
116 | ERROR | [ ] Missing parameter comment
117 | ERROR | [ ] Missing parameter comment
118 | ERROR | [ ] Missing parameter comment
119 | ERROR | [ ] Missing parameter comment
121 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
121 | ERROR | [ ] Description for the @return value is missing
123 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
123 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
123 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
123 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
123 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
123 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
130 | ERROR | [ ] Missing parameter comment
130 | ERROR | [ ] Missing parameter type
131 | ERROR | [ ] Missing parameter comment
131 | ERROR | [ ] Missing parameter type
133 | ERROR | [ ] Description for the @return value is missing
136 | ERROR | [x] Expected one space after the comma, 0 found
136 | ERROR | [x] Expected one space after the comma, 0 found
136 | ERROR | [x] Expected one space after the comma, 0 found
136 | ERROR | [x] Expected 1 space between "'name'" and double arrow; 0 found
136 | ERROR | [x] Expected 1 space between double arrow and "$messageDefinitionName"; 0 found
136 | ERROR | [x] Expected 1 space before "=>"; 0 found
136 | ERROR | [x] Expected 1 space after "=>"; 0 found
136 | ERROR | [x] Expected one space after the comma, 0 found
140 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 29 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessor/BasicUserProvider.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 110 ERRORS AND 11 WARNINGS AFFECTING 66 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
8 | ERROR | [x] There must be one blank line after the namespace declaration
9 | WARNING | [x] Unused use statement
15 | ERROR | [ ] Missing short description in doc comment
20 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "**/"
21 | ERROR | [x] Expected 1 space before "UserMessageProcessorBase"; 2 found
27 | ERROR | [ ] Missing parameter comment
28 | ERROR | [ ] Missing parameter comment
29 | ERROR | [ ] Missing parameter comment
30 | ERROR | [ ] Missing parameter comment
31 | ERROR | [ ] Missing parameter comment
33 | ERROR | [ ] Description for the @return value is missing
35 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
35 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
35 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
35 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
38 | ERROR | [x] Use null coalesce operator instead of ternary operator.
38 | ERROR | [x] Expected 1 space before "?"; 0 found
38 | ERROR | [x] Expected 1 space after "?"; 0 found
38 | ERROR | [x] Expected 1 space before ":"; 0 found
38 | ERROR | [x] Expected 1 space after ":"; 0 found
39 | ERROR | [x] Use null coalesce operator instead of ternary operator.
39 | ERROR | [x] Expected 1 space before "?"; 0 found
39 | ERROR | [x] Expected 1 space after "?"; 0 found
39 | ERROR | [x] Expected 1 space before ":"; 0 found
39 | ERROR | [x] Expected 1 space after ":"; 0 found
40 | ERROR | [x] Use null coalesce operator instead of ternary operator.
40 | ERROR | [x] Expected 1 space before "?"; 0 found
40 | ERROR | [x] Expected 1 space after "?"; 0 found
40 | ERROR | [x] Expected 1 space before ":"; 0 found
40 | ERROR | [x] Expected 1 space after ":"; 0 found
41 | ERROR | [x] Use null coalesce operator instead of ternary operator.
41 | ERROR | [x] Expected 1 space before "?"; 0 found
41 | ERROR | [x] Expected 1 space after "?"; 0 found
41 | ERROR | [x] Expected 1 space before ":"; 0 found
41 | ERROR | [x] Expected 1 space after ":"; 0 found
51 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
57 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
63 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
70 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
70 | WARNING | [x] A comma should follow the last multiline array item. Found: )
78 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
80 | ERROR | [ ] Missing parameter comment
81 | ERROR | [ ] Missing parameter comment
82 | ERROR | [ ] Missing parameter comment
83 | ERROR | [ ] Missing parameter comment
84 | ERROR | [ ] Missing parameter comment
86 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
86 | ERROR | [ ] Description for the @return value is missing
88 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
88 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
88 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
88 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
88 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
88 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
90 | ERROR | [x] Expected 1 space after IF keyword; 0 found
90 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
91 | ERROR | [x] Expected one space after the comma, 0 found
91 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
99 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
101 | ERROR | [ ] Missing parameter comment
102 | ERROR | [ ] Missing parameter comment
103 | ERROR | [ ] Missing parameter comment
104 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter comment
107 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
107 | ERROR | [ ] Description for the @return value is missing
109 | ERROR | [x] Incorrect spacing between argument "$connection" and equals sign; expected 1 but found 0
109 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$connection"; expected 1 but found 0
109 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
109 | ERROR | [x] Incorrect spacing between argument "$messageDefinitionName" and equals sign; expected 1 but found 0
109 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$messageDefinitionName"; expected 1 but found 0
109 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
119 | ERROR | [ ] Missing parameter comment
119 | ERROR | [ ] Missing parameter type
120 | ERROR | [ ] Missing parameter comment
120 | ERROR | [ ] Missing parameter type
121 | ERROR | [ ] Missing parameter comment
123 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
123 | ERROR | [ ] Description for the @return value is missing
127 | ERROR | [x] Expected one space after the comma, 0 found
133 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
136 | ERROR | [x] Expected one space after the comma, 0 found
140 | ERROR | [x] Expected 1 space after IF keyword; 0 found
140 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
145 | WARNING | [x] A comma should follow the last multiline array item. Found: 1
148 | ERROR | [x] Expected one space after the comma, 0 found
149 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
150 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
152 | ERROR | [x] Expected newline after closing brace
152 | ERROR | [x] Use "elseif" in place of "else if"
152 | ERROR | [x] Expected 1 space after IF keyword; 0 found
153 | ERROR | [x] Expected one space after the comma, 0 found
158 | ERROR | [x] Expected newline after closing brace
158 | ERROR | [x] Use "elseif" in place of "else if"
158 | ERROR | [x] Expected 1 space after IF keyword; 0 found
158 | ERROR | [x] Expected 1 space before "=="; 0 found
158 | ERROR | [x] Expected 1 space after "=="; 0 found
158 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
160 | ERROR | [x] Expected 1 space after IF keyword; 0 found
160 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
161 | ERROR | [x] Expected one space after the comma, 0 found
166 | ERROR | [x] Expected newline after closing brace
169 | ERROR | [x] Expected 1 space before "="; 0 found
169 | ERROR | [x] Expected 1 space after "="; 0 found
170 | ERROR | [x] Expected 1 space before "="; 0 found
170 | ERROR | [x] Expected 1 space after "="; 0 found
173 | ERROR | [x] Expected one space after the comma, 0 found
177 | ERROR | [x] Expected newline after closing brace
177 | ERROR | [x] Expected 1 space after ELSEIF keyword; 0 found
177 | ERROR | [x] Expected 1 space before "=="; 0 found
177 | ERROR | [x] Expected 1 space after "=="; 0 found
177 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
189 | ERROR | [ ] Missing parameter comment
189 | ERROR | [ ] Missing parameter type
191 | ERROR | [ ] Description for the @return value is missing
194 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
196 | ERROR | [x] Expected one space after the comma, 0 found
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 82 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessor/UserSyncLogger.php
----------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 1 WARNING AFFECTING 13 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
8 | ERROR | [x] There must be one blank line after the namespace declaration
9 | WARNING | [x] Unused use statement
12 | ERROR | [ ] Missing short description in doc comment
17 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "**/"
18 | ERROR | [x] Expected 1 space before "UserMessageProcessorBase"; 2 found
23 | ERROR | [ ] Missing parameter comment
23 | ERROR | [ ] Missing parameter type
24 | ERROR | [ ] Missing parameter comment
24 | ERROR | [ ] Missing parameter type
25 | ERROR | [ ] Missing parameter comment
27 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
27 | ERROR | [ ] Description for the @return value is missing
30 | ERROR | [x] Expected one space after the comma, 0 found
31 | ERROR | [x] Expected 1 space after "=>"; 0 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/views/argument_default/CurrentUserContactId.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 8 LINES
------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
12 | WARNING | [x] Unused use statement
13 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
15 | ERROR | [x] Doc comment short description must end with a full stop
23 | ERROR | [x] There must be exactly one newline after the class comment
25 | ERROR | [x] Expected 1 space after class name; 2 found
25 | ERROR | [x] Expected 1 space before extends keyword; 2 found
31 | ERROR | [x] Expected 1 space after "="; 2 found
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Plugin/UserSyncManager.php
-------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
13 | WARNING | [x] Unused use statement
36 | ERROR | [x] Expected 1 blank line after function; 0 found
37 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Annotation/UserMessageProcessor.php
-----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/src/Form/UserSyncConfigForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 77 ERRORS AND 10 WARNINGS AFFECTING 37 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
17 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
20 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [ ] Missing short description in doc comment
34 | ERROR | [x] Missing function doc comment
34 | ERROR | [x] Expected one space after the comma, 0 found
38 | ERROR | [x] Expected 1 blank line after function; 3 found
41 | ERROR | [ ] More than 2 empty lines are not allowed
75 | ERROR | [x] Use null coalesce operator instead of ternary operator.
75 | ERROR | [x] Expected 1 space before "?"; 0 found
75 | ERROR | [x] Expected 1 space after "?"; 0 found
75 | ERROR | [x] Expected 1 space before ":"; 0 found
75 | ERROR | [x] Expected 1 space after ":"; 0 found
76 | ERROR | [x] Use null coalesce operator instead of ternary operator.
76 | ERROR | [x] Expected 1 space before "?"; 0 found
76 | ERROR | [x] Expected 1 space after "?"; 0 found
76 | ERROR | [x] Expected 1 space before ":"; 0 found
76 | ERROR | [x] Expected 1 space after ":"; 0 found
77 | ERROR | [x] Use null coalesce operator instead of ternary operator.
77 | ERROR | [x] Expected 1 space before "?"; 0 found
77 | ERROR | [x] Expected 1 space after "?"; 0 found
77 | ERROR | [x] Expected 1 space before ":"; 0 found
77 | ERROR | [x] Expected 1 space after ":"; 0 found
82 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
84 | ERROR | [x] Expected 1 space before "="; 0 found
88 | ERROR | [x] Expected 1 space after "=>"; 2 found
88 | ERROR | [x] Expected 1 space between "'0'" and double arrow; 0 found
88 | ERROR | [x] Expected 1 space between double arrow and "t"; 0 found
88 | ERROR | [x] Expected 1 space before "=>"; 0 found
88 | ERROR | [x] Expected 1 space after "=>"; 0 found
88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
88 | ERROR | [x] Expected 1 space before "+"; 0 found
88 | ERROR | [x] Expected 1 space after "+"; 0 found
89 | ERROR | [x] Expected 1 space before "?"; 0 found
89 | ERROR | [x] Expected 1 space after ":"; 0 found
94 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
96 | ERROR | [x] Expected 1 space after IF keyword; 0 found
96 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
100 | ERROR | [x] Expected 1 space between "'0'" and double arrow; 0 found
100 | ERROR | [x] Expected 1 space between double arrow and "t"; 0 found
100 | ERROR | [x] Expected 1 space before "=>"; 0 found
100 | ERROR | [x] Expected 1 space after "=>"; 0 found
100 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
100 | ERROR | [x] Expected 1 space before "+"; 0 found
100 | ERROR | [x] Expected 1 space after "+"; 0 found
101 | ERROR | [x] Expected 1 space before "?"; 0 found
101 | ERROR | [x] Expected 1 space after ":"; 0 found
106 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
112 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
112 | WARNING | [x] A comma should follow the last multiline array item. Found: )
117 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
117 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
124 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
136 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
140 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
149 | ERROR | [x] Missing function doc comment
153 | ERROR | [x] Missing function doc comment
157 | ERROR | [x] Missing function doc comment
160 | ERROR | [x] Use null coalesce operator instead of ternary operator.
160 | ERROR | [x] Expected 1 space before "?"; 0 found
160 | ERROR | [x] Expected 1 space after "?"; 0 found
160 | ERROR | [x] Expected 1 space before ":"; 0 found
160 | ERROR | [x] Expected 1 space after ":"; 0 found
161 | ERROR | [x] Use null coalesce operator instead of ternary operator.
161 | ERROR | [x] Expected 1 space before "?"; 0 found
161 | ERROR | [x] Expected 1 space after "?"; 0 found
161 | ERROR | [x] Expected 1 space before ":"; 0 found
161 | ERROR | [x] Expected 1 space after ":"; 0 found
164 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
183 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
191 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
191 | ERROR | [x] Inline comments must start with a capital letter
191 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
192 | ERROR | [x] Expected newline after closing brace
197 | ERROR | [x] Missing function doc comment
197 | ERROR | [x] Expected 1 space before opening brace; found 0
198 | ERROR | [x] Expected one space after the comma, 0 found
198 | ERROR | [x] Expected one space after the comma, 0 found
198 | ERROR | [x] Expected one space after the comma, 0 found
198 | ERROR | [x] Expected one space after the comma, 0 found
198 | ERROR | [x] Expected 1 space between "'limit'" and double arrow; 0 found
198 | ERROR | [x] Expected 1 space between double arrow and "0"; 0 found
198 | ERROR | [x] Expected 1 space before "=>"; 0 found
198 | ERROR | [x] Expected 1 space after "=>"; 0 found
201 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
201 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 79 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.module
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AND 1 WARNING AFFECTING 17 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [x] You must use "/**" style comments for a file comment
22 | ERROR | [x] Expected 1 space after "="; 2 found
33 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
35 | ERROR | [x] Expected 1 space before opening brace; found 0
36 | ERROR | [x] Inline comments must start with a capital letter
36 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
38 | ERROR | [x] Expected 1 space after IF keyword; 0 found
38 | ERROR | [x] Expected 1 space before "=="; 0 found
38 | ERROR | [x] Expected 1 space after "=="; 0 found
38 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
39 | ERROR | [x] Expected 1 space between comma and "null"; 0 found
39 | ERROR | [x] Expected one space after the comma, 0 found
39 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
43 | ERROR | [ ] Missing short description in doc comment
44 | ERROR | [ ] Missing parameter comment
44 | ERROR | [ ] Missing parameter type
45 | ERROR | [ ] Missing parameter comment
46 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter comment
47 | ERROR | [x] Expected "\Drupal\Core\Field\FieldItemListInterface|null" but found "\Drupal\Core\Field\FieldItemListInterface|NULL" for parameter type
49 | ERROR | [ ] Description for the @return value is missing
51 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
53 | ERROR | [x] Expected one space after the comma, 0 found
53 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
55 | ERROR | [x] Expected newline after closing brace
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 18 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
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
8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-------------------------------------------------------------------------------------------------------------

šŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India himanshu_jhaloya Indore

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 @himanshu_jhaloya
  • @himanshu_jhaloya opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Status changed to Needs work 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @himanshu_jhaloya,

    I tried to apply MR!1 but encountered an error.

    āžœ  cmrf_user_sync git:(1.0.x) āœ— curl https://git.drupalcode.org/project/cmrf_user_sync/-/merge_requests/1.diff | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 43375    0 43375    0     0    97k      0 --:--:-- --:--:-- --:--:--   97k
    Checking patch cmrf_user_sync.info.yml...
    error: while searching for:
    core_version_requirement: ^8 || ^9 || ^10
    package: 'CiviCRM'
    dependencies:
      - cmrf_core
    
    error: patch failed: cmrf_user_sync.info.yml:5
    error: cmrf_user_sync.info.yml: patch does not apply
    Checking patch cmrf_user_sync.module...
    Checking patch cmrf_user_sync.routing.yml...
    Checking patch src/Annotation/UserMessageProcessor.php...
    Checking patch src/Form/UserSyncConfigForm.php...
    Checking patch src/Plugin/QueueWorker/UserSyncQueue.php...
    error: while searching for:
    <?php
    /*
     * @author Klaas Eikelboom  <klaas.eikelboom@civicoop.org>
     * @date 17-Jan-2022
     * @license  GPL-2.0-or-later
     */
    
    namespace Drupal\cmrf_user_sync\Plugin\QueueWorker;
    
    use Drupal\Core\Annotation\QueueWorker;
    use Drupal\Core\Queue\QueueWorkerBase;
    
    /**
    
    error: patch failed: src/Plugin/QueueWorker/UserSyncQueue.php:1
    error: src/Plugin/QueueWorker/UserSyncQueue.php: patch does not apply
    Checking patch src/Plugin/UserMessageProcessor/BasicUserProvider.php...
    error: while searching for:
      /**
       * Process a message.
       *
       * @param $contact_id
       * @param $message
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       *
       * @return void
       */
      public function process($contact_id, $message, $config) {
        if ($config->get('enable_logging')) {
          \Drupal::logger('cmrf_user_sync')->notice('Processing message for Contact [@contact_id]. Message: @message',[
            '@contact_id' => $contact_id,
            '@message' => json_encode($message, JSON_PRETTY_PRINT),
          ]);
        }
    
        /* @var $query \Drupal\Core\Entity\Query\Sql\Query */
        $query = \Drupal::entityQuery('user');
    
        $users = $query->condition('field_user_contact_id',$contact_id)->execute();
        $email = $message[$config->get('email')];
        $name = $message[$config->get('name')];
        $emailExists = $this->checkIfEmailExist($email);
        if(empty($users) && !$emailExists && $email){
          $user = User::create([
            'mail' => $email,
            'field_user_contact_id' => $contact_id,
            'name' => $name,
            'status' => 1
          ]);
          $user->save();
          \Drupal::logger('cmrf_user_sync')->notice('Created new user @name identified with @contact_id',[
              '@name' => $name,
              '@contact_id' => $contact_id,
          ]);
        } else if(empty($users) && $emailExists) {
          \Drupal::logger('cmrf_user_sync')->notice('Unable to create user @name identified with @contact_id because another user with email @email already exists',[
            '@name' => $name,
            '@contact_id' => $contact_id,
            '@email' => $email,
          ]);
        } else if(count($users)==1 && $email){
          $user = User::load(reset($users));
          if($emailExists){
            \Drupal::logger('cmrf_user_sync')->notice('Could not update email for user @name identified with @contact_id because other user with email @email already exists',[
              '@name' => $name,
              '@contact_id' => $contact_id,
              '@email' => $email,
            ]);
          } else {
            $user->mail->value = $email;
          }
          $user->field_user_contact_id->value=$contact_id;
          $user->name->value=$name;
          $user->status = 1;
          $user->save();
          \Drupal::logger('cmrf_user_sync')->notice('Updates existing user @name identified with @contact_id',[
            '@name' => $name,
            '@contact_id' => $contact_id,
          ]);
        } elseif(count($users)==1 && !$email){
          $user = User::load(reset($users));
          if (!$user->hasRole('administrator')) {
            $user->status = 0;
    
    error: patch failed: src/Plugin/UserMessageProcessor/BasicUserProvider.php:116
    error: src/Plugin/UserMessageProcessor/BasicUserProvider.php: patch does not apply
    Checking patch src/Plugin/UserMessageProcessor/UserSyncLogger.php...
    Checking patch src/Plugin/UserMessageProcessorBase.php...
    Hunk #2 succeeded at 13 (offset 1 line).
    Hunk #3 succeeded at 28 (offset 1 line).
    error: while searching for:
      /**
       * Process a message.
       *
       * @param $contact_id
       * @param $message
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       *
       * @return void
       */
      abstract public function process($contact_id, $message, $config);
    
      /**
       * Returns the form.
       *
       * Child classes could override this function to change the configuration form.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return array
       */
      public function buildForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null) {
        return $form;
      }
    
      /**
       * Validates the form and sets errors if there are any.
       *
       * Child classes could override this function to change the configuration form.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return void
       */
      public function validateForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null) {
    
      }
    
      /**
       * Process the submitted configuration.
       *
       * Child classes could override this function to change the configuration form.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return void
       */
      public function submitForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null) {
    
      }
    
      /**
       * Returns a list of fields available in the message definition.
       *
       * @param $connection
       * @param $messageDefinitionName
       *
       * @return array
       */
      protected function getFieldsFromMessageDefinition($connection, $messageDefinitionName) {
        $call = $this->core->createCall($connection,'ChangeMessageDefinition','getsingle',['name'=>$messageDefinitionName],[]);
        $result = $this->core->executeCall($call);
        $fields = $result['message_provider_fields'];
        if (!is_array($fields)) {
          $fields = array();
        }
        return $fields;
    
    
    error: patch failed: src/Plugin/UserMessageProcessorBase.php:65
    error: src/Plugin/UserMessageProcessorBase.php: patch does not apply
    Checking patch src/Plugin/UserMessageProcessorInterface.php...
    error: while searching for:
      /**
       * Process a message.
       *
       * @param $contact_id
       * @param $message
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       *
       * @return void
       */
      public function process($contact_id, $message, $config);
    
      /**
       * Returns the form.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return array
       */
      public function buildForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null);
    
      /**
       * Validates the form and sets errors if there are any.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return void
       */
      public function validateForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null);
    
      /**
       * Process the submitted configuration.
       *
       * @param array $form
       * @param \Drupal\Core\Form\FormStateInterface $form_state
       * @param \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config
       * @param string|null $connection
       * @param string|null $messageDefinitionName
       *
       * @return void
       */
      public function submitForm(array $form, FormStateInterface $form_state, $config, $connection=null, $messageDefinitionName=null);
    
    }
    
    error: patch failed: src/Plugin/UserMessageProcessorInterface.php:18
    error: src/Plugin/UserMessageProcessorInterface.php: patch does not apply
    Checking patch src/Plugin/UserSyncManager.php...
    Checking patch src/Plugin/views/argument_default/CurrentUserContactId.php...
    āžœ  cmrf_user_sync git:(1.0.x) āœ—

    Please check and advise.
    Thank you.

  • Pipeline finished with Failed
    4 months ago
    Total: 1336s
    #222625
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    apaderno ā†’ changed the visibility of the branch 3359010-fix-the-issues to hidden.

  • Status changed to Needs review 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi,

    I fix some of the phpcs issues. These are the remaining issues.

    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml cmrf_user_sync
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.info.yml
    -----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------
     7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    -----------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.routing.yml
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access
       |         | administration pages" which is about viewing but not changing configurations.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/cmrf_user_sync.module
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 10 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      3 | ERROR   | [ ] Missing short description in doc comment
      4 | ERROR   | [x] The second line in the file doc comment must be "@file"
      4 | WARNING | [ ] @author tags are not usually used in Drupal, because over time multiple contributors will touch the code anyway
     34 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
        |         |     "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
     44 | ERROR   | [ ] Missing short description in doc comment
     45 | ERROR   | [ ] Missing parameter comment
     45 | ERROR   | [ ] Missing parameter type
     46 | ERROR   | [ ] Missing parameter comment
     47 | ERROR   | [ ] Missing parameter comment
     48 | ERROR   | [ ] Missing parameter comment
     50 | ERROR   | [ ] Description for the @return value is missing
     52 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Form/UserSyncConfigForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 7 ERRORS AND 4 WARNINGS AFFECTING 11 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
       3 | ERROR   | Namespaced classes, interfaces and traits should not begin with a file doc comment
      18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
      21 | ERROR   | Missing member variable doc comment
      30 | ERROR   | Missing short description in doc comment
      87 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      99 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     111 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     148 | ERROR   | Doc comment is empty
     155 | ERROR   | Doc comment is empty
     162 | ERROR   | Doc comment is empty
     206 | ERROR   | Doc comment is empty
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/QueueWorker/UserSyncQueue.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 8 LINES
    ----------------------------------------------------------------------------------------------------------------------------
      3 | ERROR | Namespaced classes, interfaces and traits should not begin with a file doc comment
     25 | ERROR | Missing short description in doc comment
     30 | ERROR | Missing short description in doc comment
     35 | ERROR | Missing short description in doc comment
     40 | ERROR | Missing short description in doc comment
     63 | ERROR | Doc comment is empty
     84 | ERROR | Missing short description in doc comment
     85 | ERROR | Missing parameter comment
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessor/PortalUserProvider.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 31 ERRORS AND 7 WARNINGS AFFECTING 38 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
       3 | ERROR   | Namespaced classes, interfaces and traits should not begin with a file doc comment
      19 | ERROR   | Missing short description in doc comment
      24 | ERROR   | Wrong function doc comment end; expected "*/", found "**/"
      31 | ERROR   | Missing parameter comment
      32 | ERROR   | Missing parameter comment
      33 | ERROR   | Missing parameter comment
      34 | ERROR   | Missing parameter comment
      35 | ERROR   | Missing parameter comment
      37 | ERROR   | Description for the @return value is missing
      55 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      61 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      75 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      93 | ERROR   | Doc comment is empty
     112 | WARNING | Line exceeds 80 characters; contains 81 characters
     114 | ERROR   | Missing parameter comment
     115 | ERROR   | Missing parameter comment
     116 | ERROR   | Missing parameter comment
     117 | ERROR   | Missing parameter comment
     118 | ERROR   | Missing parameter comment
     120 | ERROR   | Description for the @return value is missing
     133 | WARNING | Line exceeds 80 characters; contains 81 characters
     135 | ERROR   | Missing parameter comment
     136 | ERROR   | Missing parameter comment
     137 | ERROR   | Missing parameter comment
     138 | ERROR   | Missing parameter comment
     139 | ERROR   | Missing parameter comment
     141 | ERROR   | Description for the @return value is missing
     157 | ERROR   | Missing parameter comment
     158 | ERROR   | Missing parameter comment
     159 | ERROR   | Missing parameter comment
     215 | ERROR   | Doc comment is empty
     256 | ERROR   | Doc comment is empty
     300 | ERROR   | Missing short description in doc comment
     301 | ERROR   | Missing parameter comment
     302 | ERROR   | Missing parameter comment
     304 | ERROR   | Description for the @return value is missing
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessor/BasicUserProvider.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 30 ERRORS AND 6 WARNINGS AFFECTING 33 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
       3 | ERROR   | Namespaced classes, interfaces and traits should not begin with a file doc comment
      16 | ERROR   | Missing short description in doc comment
      21 | ERROR   | Wrong function doc comment end; expected "*/", found "**/"
      28 | ERROR   | Missing parameter comment
      29 | ERROR   | Missing parameter comment
      30 | ERROR   | Missing parameter comment
      31 | ERROR   | Missing parameter comment
      32 | ERROR   | Missing parameter comment
      34 | ERROR   | Description for the @return value is missing
      52 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      58 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      64 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      71 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      79 | WARNING | Line exceeds 80 characters; contains 81 characters
      81 | ERROR   | Missing parameter comment
      82 | ERROR   | Missing parameter comment
      83 | ERROR   | Missing parameter comment
      84 | ERROR   | Missing parameter comment
      85 | ERROR   | Missing parameter comment
      87 | ERROR   | Description for the @return value is missing
     100 | WARNING | Line exceeds 80 characters; contains 81 characters
     102 | ERROR   | Missing parameter comment
     103 | ERROR   | Missing parameter comment
     104 | ERROR   | Missing parameter comment
     105 | ERROR   | Missing parameter comment
     106 | ERROR   | Missing parameter comment
     108 | ERROR   | Description for the @return value is missing
     120 | ERROR   | Missing parameter comment
     120 | ERROR   | Missing parameter type
     121 | ERROR   | Missing parameter comment
     121 | ERROR   | Missing parameter type
     122 | ERROR   | Missing parameter comment
     124 | ERROR   | Description for the @return value is missing
     194 | ERROR   | Missing parameter comment
     194 | ERROR   | Missing parameter type
     196 | ERROR   | Description for the @return value is missing
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessor/UserSyncLogger.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 7 LINES
    --------------------------------------------------------------------------------------------------------------------------------------
      3 | ERROR | Namespaced classes, interfaces and traits should not begin with a file doc comment
     13 | ERROR | Missing short description in doc comment
     18 | ERROR | Wrong function doc comment end; expected "*/", found "**/"
     24 | ERROR | Missing parameter comment
     24 | ERROR | Missing parameter type
     25 | ERROR | Missing parameter comment
     25 | ERROR | Missing parameter type
     26 | ERROR | Missing parameter comment
     28 | ERROR | Description for the @return value is missing
    --------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessorBase.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 29 ERRORS AND 3 WARNINGS AFFECTING 30 LINES
    ---------------------------------------------------------------------------------------------------------------------------
       3 | ERROR   | Namespaced classes, interfaces and traits should not begin with a file doc comment
      22 | ERROR   | Missing member variable doc comment
      31 | ERROR   | Missing short description in doc comment
      70 | ERROR   | Missing parameter comment
      71 | ERROR   | Missing parameter comment
      72 | ERROR   | Missing parameter comment
      79 | WARNING | Line exceeds 80 characters; contains 81 characters
      81 | ERROR   | Missing parameter comment
      82 | ERROR   | Missing parameter comment
      83 | ERROR   | Missing parameter comment
      84 | ERROR   | Missing parameter comment
      85 | ERROR   | Missing parameter comment
      87 | ERROR   | Description for the @return value is missing
      96 | WARNING | Line exceeds 80 characters; contains 81 characters
      98 | ERROR   | Missing parameter comment
      99 | ERROR   | Missing parameter comment
     100 | ERROR   | Missing parameter comment
     101 | ERROR   | Missing parameter comment
     102 | ERROR   | Missing parameter comment
     104 | ERROR   | Description for the @return value is missing
     113 | WARNING | Line exceeds 80 characters; contains 81 characters
     115 | ERROR   | Missing parameter comment
     116 | ERROR   | Missing parameter comment
     117 | ERROR   | Missing parameter comment
     118 | ERROR   | Missing parameter comment
     119 | ERROR   | Missing parameter comment
     121 | ERROR   | Description for the @return value is missing
     130 | ERROR   | Missing parameter comment
     130 | ERROR   | Missing parameter type
     131 | ERROR   | Missing parameter comment
     131 | ERROR   | Missing parameter type
     133 | ERROR   | Description for the @return value is missing
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/cmrf_user_sync/src/Plugin/UserMessageProcessorInterface.php
    --------------------------------------------------------------------------------------------------------------------------------
    FOUND 21 ERRORS AFFECTING 21 LINES
    --------------------------------------------------------------------------------------------------------------------------------
     23 | ERROR | Missing parameter comment
     24 | ERROR | Missing parameter comment
     25 | ERROR | Missing parameter comment
     32 | ERROR | Missing parameter comment
     33 | ERROR | Missing parameter comment
     34 | ERROR | Missing parameter comment
     35 | ERROR | Missing parameter comment
     36 | ERROR | Missing parameter comment
     38 | ERROR | Description for the @return value is missing
     45 | ERROR | Missing parameter comment
     46 | ERROR | Missing parameter comment
     47 | ERROR | Missing parameter comment
     48 | ERROR | Missing parameter comment
     49 | ERROR | Missing parameter comment
     51 | ERROR | Description for the @return value is missing
     58 | ERROR | Missing parameter comment
     59 | ERROR | Missing parameter comment
     60 | ERROR | Missing parameter comment
     61 | ERROR | Missing parameter comment
     62 | ERROR | Missing parameter comment
     64 | ERROR | Description for the @return value is missing
    --------------------------------------------------------------------------------------------------------------------------------
    
    Time: 385ms; Memory: 12MB
    
    āžœ  contrib

    Please review.

    Thank you.

  • Status changed to Fixed 4 months ago
  • šŸ‡³šŸ‡±Netherlands Klaas Culemborg

    I have run the phpcs and the correction manually.

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

Production build 0.71.5 2024