Fix the issues reported by phpcs

Created on 22 March 2023, over 1 year ago
Updated 20 August 2024, 3 months ago
šŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India samit.310@gmail.com

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 @samit.310@gmail.com
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India samit.310@gmail.com

    Above warning has been fixed.

  • First commit to issue fork.
  • šŸ‡®šŸ‡³India rassoni Bangalore
  • Status changed to Needs work over 1 year ago
  • šŸ‡®šŸ‡³India hardikpandya

    RTBC for the patch provided by @samit.310@gmail.com. The MR removes the comment entirely which is inappropriate and hence marking this as Needs Work.

  • šŸ‡®šŸ‡³India rassoni Bangalore

    @hardikpandya I have removed the code because the code is commented.

    Commented out code should be simply removed.

    PHPCS throw commented code issue which is unnecessary.

  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    The MR is correct: Commented out code should be removed, except in the case the code is planned to be re-added, but in that case there should be a @todo comment saying that.

  • Status changed to Needs work 3 months ago
  • Hi @Rassoni,

    I have applied the changes you committed on MR!2, some errors were still reported. Please see below:

    āžœ  content_moderation_node_grants git:(1.0.x) curl https://git.drupalcode.org/project/content_moderation_node_grants/-/merge_requests/2.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   881    0   881    0     0   3029      0 --:--:-- --:--:-- --:--:--  3157
    patching file src/Plugin/views/filter/UpdatableFilter.php
    āžœ  content_moderation_node_grants 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 content_moderation_node_grants
    
    FILE: /Users/PrometInterns/Demo-site/drupal-orgissue/web/modules/contrib/content_moderation_node_grants/content_moderation_node_grants.module
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Html.
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/PrometInterns/Demo-site/drupal-orgissue/web/modules/contrib/content_moderation_node_grants/content_moderation_node_grants.node_grants.inc
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------------
     13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Session\AccountInterface.
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 224ms; Memory: 10MB

    Kindly check

    Thanks,
    Jake

  • Thanks for looking into the issue.

    Can the @todo comment be left in for future reference?

  • Pipeline finished with Success
    3 months ago
    Total: 127s
    #259556
  • Pipeline finished with Success
    3 months ago
    #259558
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno ā†’ changed the visibility of the branch 3349518-gitlab-ci-reports to hidden.

  • Status changed to Needs review 3 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Success
    3 months ago
    Total: 125s
    #259570
Production build 0.71.5 2024