Problem/Motivation

There is a file that needs to be fixed with coding standards.
Here is the command: -
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml web/modules/custom/doissues/views_summary_tabs-3436688/

FILE: D:\wamp64\www\drupal10\modules\custom\doissues\views_summary_tabs-3436688\src\Plugin\views\style\TabsSummary.php
----------------------------------------------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------------------------------------------


FILE: D:\wamp64\www\drupal10\modules\custom\doissues\views_summary_tabs-3436688\views_summary_tabs.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
---------------------------------------------------------------------------------------------------------


FILE: D:\wamp64\www\drupal10\modules\custom\doissues\views_summary_tabs-3436688\views_summary_tabs.theme.inc
------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 8 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------

Time: 338ms; Memory: 10MB

Steps to reproduce

Run PHPCS on Views Summary Tabs module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

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

amanmansuri72 created an issue. See original summary.

amanbtr72’s picture

Issue summary: View changes

amanbtr72’s picture

Status: Active » Needs review
clarkssquared’s picture

Hi

I applied MR !4 and I confirmed that it fixes the PHPCS issues that were reported, the remaining PHPCS warnings happen when the module is installed via composer.

➜  views_summary_tabs git:(master) ✗ curl https://git.drupalcode.org/project/views_summary_tabs/-/merge_requests/4.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   529    0   529    0     0    932      0 --:--:-- --:--:-- --:--:--   944
patching file views_summary_tabs.theme.inc
➜  views_summary_tabs git:(master) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml views_summary_tabs 

FILE: ...9-local/web/modules/contrib/views_summary_tabs/views_summary_tabs.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
 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
--------------------------------------------------------------------------------

Time: 194ms; Memory: 10MB

➜  contrib git:(master) ✗ 

RTBC +1 from me

amanbtr72’s picture

Status: Needs review » Reviewed & tested by the community

  • mandclu committed 557f4196 on 1.0.x authored by amanbtr72
    task: #3436688 Fix the issues reported by phpcs
    
    By: amanbtr72
    By:...
mandclu’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for identifying this, and for the work on a solution.

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.

Status: Fixed » Closed (fixed)

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