Problem/Motivation

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

FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/src/Form/Settings.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
11 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
74 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/src/Plugin/ConfigFilter/ProfileFilter.php
----------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Doc comment short description must end with a full stop
23 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
104 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter type
106 | ERROR | [ ] Missing parameter comment
106 | ERROR | [ ] Missing parameter type
107 | ERROR | [ ] Missing parameter comment
127 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
127 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
138 | ERROR | [ ] Missing parameter type
146 | WARNING | [ ] The use of function fnmatch() is discouraged
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/config_profile.info.yml
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/config_profile.links.menu.yml
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 314 characters
19 | WARNING | Line exceeds 80 characters; contains 309 characters
27 | WARNING | Line exceeds 80 characters; contains 398 characters
28 | WARNING | Line exceeds 80 characters; contains 316 characters
29 | WARNING | Line exceeds 80 characters; contains 110 characters
33 | WARNING | Line exceeds 80 characters; contains 220 characters
----------------------------------------------------------------------

Time: 340ms; Memory: 12MB

Steps to reproduce

Proposed resolution

RUN:

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

Remaining tasks

User interface changes

API changes

Data model changes

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

dineshkumarbollu created an issue. See original summary.

dineshkumarbollu’s picture

Assigned: dineshkumarbollu » Unassigned
Status: Active » Needs review
StatusFileSize
new7.02 KB

Hi

i fixed all phpcs issues except

146 | WARNING | [ ] The use of function fnmatch() is discouraged

please review

kenyoowen’s picture

Status: Needs review » Needs work
StatusFileSize
new297.4 KB
new240.54 KB

Hi dineshkumarbollu

I applied patch#2 to the “Config Profile” module and it has 2 remaining issues one issue is you mentioned in the comment but the other issue is in the description. Please see the screenshots attached.

For your review.
Thank you.

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

akshaydalvi212’s picture

Assigned: Unassigned » akshaydalvi212

i will work on this and update with an MR.

akshaydalvi212’s picture

Assigned: akshaydalvi212 » Unassigned
Status: Needs work » Needs review

Removed both dependency injection and fnmatch() warning.
raised the MR with all the changes.
kindly review the MR.

dineshkumarbollu’s picture

StatusFileSize
new17.65 KB

Hi

The MR!2 looks fine. No phpcs errors found

Thanks

naveenvalecha’s picture

Title: Fix the issues reported by phpcs » Fix Coding Standards

naveenvalecha’s picture

Status: Needs review » Fixed

PR has been merged to 8.x-1.x

Status: Fixed » Closed (fixed)

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