Problem/Motivation

There is a files need to fixed with coding standards.
Here is the command : -
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml \modules\contrib\views_exposed_form_mobile

FILE: \modules\contrib\views_exposed_form_mobile\css\views-exposed-form.css
--------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
4 | ERROR | [x] Expected 1 space before opening brace of class definition; 2 found
10 | ERROR | [x] Expected 1 space before opening brace of class definition; 2 found
13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: \modules\contrib\views_exposed_form_mobile\README.md
---------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------
31 | WARNING | Line exceeds 80 characters; contains 83 characters
---------------------------------------------------------------------------------

FILE: \modules\contrib\views_exposed_form_mobile\src\Hook\ViewsExposedFormMobileHooks.php
----------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
30 | ERROR | [x] Doc comment short description must end with a full stop
55 | WARNING | [x] There must be no blank line following an inline comment
64 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
71 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------

FILE: \modules\contrib\views_exposed_form_mobile\src\Plugin\views\display_extender\ViewsExposedFormMobile.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
8 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
31 | ERROR | [x] Closing brace indented incorrectly; expected 3 spaces, found 2
31 | ERROR | [x] Expected 1 blank line after function; 2 found
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------

FILE: \modules\contrib\views_exposed_form_mobile\views_exposed_form_mobile.module
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

Time: 769ms; Memory: 10MB

Steps to reproduce

CommentFileSizeAuthor
#3 3516172-fix-the-issues-1.patch1.47 KBhimanshu_jhaloya
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

dev.drupal.ln created an issue. See original summary.

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

himanshu_jhaloya’s picture

StatusFileSize
new1.47 KB

Created patch to fixed the issues

joachim’s picture

Status: Active » Fixed

Thanks!

I've committed your patch apart from the weird change it made to a CSS docblock.

There's a few things in the phpcs I can't see, such as:

> 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
> 8 | WARNING | [x] Unused use statement
> 22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3

Are you sure you used the right configuration for it?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • joachim committed f82ae853 on 1.0.x
    fix: #3516172 fix issues reported by phpcs
    
    By: dev.drupal.ln

Status: Fixed » Closed (fixed)

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