Fix the issues reported by phpcs

Created on 28 March 2024, 8 months ago
Updated 9 July 2024, 5 months ago

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.

šŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India amanbtr72

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @amanbtr72
  • Merge request !4Fixed all phpcs issues ā†’ (Open) created by amanbtr72
  • Status changed to Needs review 8 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    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

  • Status changed to RTBC 5 months ago
Production build 0.71.5 2024