Fix the issues reported by phpcs

Created on 10 July 2023, over 1 year ago
Updated 15 August 2024, 3 months ago
šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India urvashi_vora Madhya Pradesh, India

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.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @urvashi_vora
  • Status changed to Needs work about 1 year ago
  • šŸ‡®šŸ‡³India Ashutosh Ahirwal India

    Hi, Provided patch get applied but there are some remaining issue too.

    used command:- ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/sdb
    Remaining issue's are

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/sdb/src/Plugin/Block/SimpleDateBlock.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Datetime\DateTimePlus.
    26 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    45 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------

  • Status changed to Needs review about 1 year ago
  • šŸ‡®šŸ‡³India Ashutosh Ahirwal India

    Providing Updated patch.

  • šŸ‡®šŸ‡³India mrinalini9 New Delhi

    Hi,

    I have reviewed patch #3, looks good to me. It applied cleanly:

    Checking patch simple_date_block.info.yml...
    Checking patch src/Plugin/Block/SimpleDateBlock.php...
    Applied patch simple_date_block.info.yml cleanly.
    Applied patch src/Plugin/Block/SimpleDateBlock.php cleanly.
    

    And fixed all the phpcs issues as reported above.

    So, for me, it is RTBC.

    Thanks!

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡¬šŸ‡§United Kingdom schillerm

    Hi, I also got no phpsc errors back after applying patch #3. +1 for RTBC from me as well.

  • Status changed to RTBC 3 months ago
  • Hi @everyone,

    Also applied patch from comment #3, confirmed no issues remaining.

     sdb git:(1.0.x) curl https://www.drupal.org/files/issues/2023-10-17/phpcs-issue-fixes.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2885  100  2885    0     0   6507      0 --:--:-- --:--:-- --:--:--  6647
    patching file simple_date_block.info.yml
    patching file src/Plugin/Block/SimpleDateBlock.php
    āžœ  sdb git:(1.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig sdb
    āžœ  contrib git:(main) āœ—

    Will now move this to RTBC

    Thanks,
    Jake

  • Status changed to Needs work 3 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    Let's create a merge request, now that patches are no longer tested.

  • Pipeline finished with Success
    3 months ago
    Total: 168s
    #255014
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
Production build 0.71.5 2024