$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml role_theme_switcher/

FILE: ...rs\SI-001\Downloads\role_theme_switcher\role_theme_switcher.links.menu.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...Users\SI-001\Downloads\role_theme_switcher\role_theme_switcher.routing.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: ...sers\SI-001\Downloads\role_theme_switcher\role_theme_switcher.services.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 3 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...\Users\SI-001\Downloads\role_theme_switcher\src\Form\AdminSettingsForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
135 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------

FILE: ...01\Downloads\role_theme_switcher\src\Theme\RoleThemeSwitcherNegotiator.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
13 | WARNING | The class short comment should describe what the class does and
| | not simply repeat the class name
--------------------------------------------------------------------------------

Time: 293ms; Memory: 10MB

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

Rakhi Soni created an issue. See original summary.

rakhi soni’s picture

Assigned: rakhi soni » Unassigned
Status: Active » Needs review
StatusFileSize
new2.12 KB

I have created a patch to fix the issue of Drupal Coding Standard,, Please review.

mrinalini9’s picture

Status: Needs review » Needs work

Hi,

I have reviewed patch #2, looks good to me. It applied cleanly and fixed all errors and warnings.
But the class short comment doesn't seem proper to me here:

- * Class RoleThemeSwitcherNegotiator.
+ * Class for RoleThemeSwitcherNegotiator.

It should describe what the class does.

So, moving this to Needs Work.

Thanks & Regards,
Mrinalini

urvashi_vora’s picture

Assigned: Unassigned » urvashi_vora

Hi,

I am working on this

urvashi_vora’s picture

Assigned: urvashi_vora » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.15 KB

Hi,

Please review this patch. As per suggestion, I fixed the class comment.

Thanks

mrinalini9’s picture

Status: Needs review » Needs work

Patch #5 doesn't applied properly, getting some errors related to trailing whitespace:

coding-standard-fixed-3291607-5.patch:11: trailing whitespace.
  
warning: 1 line adds whitespace errors.

Please fix it.

So, moving this back to Needs Work.

urvashi_vora’s picture

Status: Needs work » Needs review
StatusFileSize
new2.12 KB

Hi,

Hope now the issue gets fixed. Applying the patch.

Thanks

neslee canil pinto’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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