Currently this wonderful module has 13 Coding Standard Issues: (See https://www.drupal.org/pift-ci-job/2119784)

src/ContentModerationNotificationsAccessController.php
line 24	Possible useless method overriding detected
src/Form/ContentModerationNotificationsFormBase.php
6	Unused use statement
7	Unused use statement
10	Unused use statement
209	Expected 1 space after "="; 2 found
212	A comma should follow the last multiline array item. Found: 10
293	The array declaration extends to column 237 (the limit is 80). The array content should be split up over multiple lines
298	The array declaration extends to column 235 (the limit is 80). The array content should be split up over multiple lines
tests/modules/content_moderation_notifications_test/content_moderation_notifications_test.module
16	The array declaration extends to column 81 (the limit is 80). The array content should be split up over multiple lines
tests/src/Functional/Form/CrudFormTest.php
91	The array declaration extends to column 170 (the limit is 80). The array content should be split up over multiple lines
96	The array declaration extends to column 112 (the limit is 80). The array content should be split up over multiple lines
111	Expected 1 space after "=>"; 2 found
116	The array declaration extends to column 180 (the limit is 80). The array content should be split up over multiple lines

Let's see if we can fix them here.

Original IS:

When run the code against phps, I get few warnings. The attached patch will fix this issue:

FILE: /var/www/drupalvm/docroot/checking/content_moderation_notifications/src/Form/ContentModerationNotificationsFormBase.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
-----------------------------------------------------------------------------------------------------------------------------

CommentFileSizeAuthor
#2 3112992-coding-standard-fixes.patch1.81 KBpoorva
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

poorva created an issue. See original summary.

poorva’s picture

StatusFileSize
new1.81 KB
poorva’s picture

Status: Active » Needs review
poorva’s picture

Hi Team,

If you can check this patch is ready to use or not will be helpful.

spokje’s picture

Assigned: poorva » spokje
Issue summary: View changes
Status: Needs review » Needs work
spokje’s picture

Hiding now outdated patch

spokje’s picture

Version: 8.x-3.2 » 8.x-3.x-dev
Assigned: spokje » Unassigned
Status: Needs work » Needs review
spokje’s picture

As can be seen here (where I had it wrong, per usual on my first commit...) https://www.drupal.org/pift-ci-job/2120108 testing an MR/patch does indeed detect Coding Standard Issues.

As can be seen here (where I _finally_ seemed to get it right...) https://www.drupal.org/pift-ci-job/2120120 there are no more remaining Coding Standard Issues.

dww’s picture

Status: Needs review » Reviewed & tested by the community

Indeed, all the latest test results for the MR are showing no code standards violations:

I reviewed https://git.drupalcode.org/project/content_moderation_notifications/-/me... and everything looks good. No functional changes, just whitespace, indentation, adding , where needed, and removing unused use statements.

RTBC!

Thanks,
-Derek

jhedstrom made their first commit to this issue’s fork.

jhedstrom’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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