Fix the issues reported by phpcs

Created on 5 April 2023, over 1 year ago
Updated 24 June 2024, 6 months ago

GitLab CI reports PHP_CodeSniffer warnings/errors which should be fixed.

FILE: ...les/custom/cloudflare-3352408/tests/src/Functional/OverrideGlobalsTest.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
 10 | ERROR | [x] Doc comment short description must end with a full stop
    |       |     (Drupal.Commenting.DocComment.ShortFullStop)
 56 | ERROR | [x] Expected 1 blank line after function; 0 found
    |       |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 57 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
    |       |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...stom/cloudflare-3352408/modules/cloudflarepurger/src/Form/SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 39 | ERROR | [x] Expected 1 space after "=>"; 2 found
    |       |     (Squiz.WhiteSpace.OperatorSpacing.SpacingAfter)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 780ms; Memory: 6MB

 
 

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia TanujJain-TJ

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 @TanujJain-TJ
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia TanujJain-TJ

    Adding a patch to resolve all phpcs errors.

    ignored these 2 errors as it contains installation commands

    FILE: /docs/enterprise_setup.md
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     4 | WARNING | Line exceeds 80 characters; contains 128 characters
    ----------------------------------------------------------------------
    
    
    FILE: /docs/freetier_setup.md
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     4 | WARNING | Line exceeds 80 characters; contains 128 characters
    ----------------------------------------------------------------------
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines kenyoOwen

    Hi tanuj

    I applied patch #2 to the โ€œCloudFlareโ€ module against Version 2.0.x-dev and confirmed that the errors and warnings are resolved and the remaining issue is ignored since it is an installation command. Please see the screenshots attached.

    For your review.
    Thank you.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
     /**
    - * Class SettingsForm.
    + * Creates Settings Form.

    I am not sure Creates is the right verb.
    Settings and Form are misspelled, since they are not the first word in the phrase.

    +  /**
    +   * The state store.
    +   *
    +   * @var Drupal\Core\State\StateInterface
    +   */
    +  protected $state;
    +   * @param Drupal\Core\State\StateInterface $state
    +   *   The object State.

    That service is usually described as The state key/value store.

  • Assigned to imustakim
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada

    Working on this.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Unable to generate test groups
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada

    Patch updated.
    Please review.

  • Hi, Reviewed the patch at #8, applies cleanly and addresses the comment #6, but found few warnings. Attaching the ss for reference.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Re-roll the patch #8 according to the latest code changes.

  • Pipeline finished with Canceled
    7 months ago
    Total: 46s
    #193471
  • Pipeline finished with Failed
    7 months ago
    Total: 149s
    #193474
  • Pipeline finished with Canceled
    7 months ago
    Total: 42s
    #193521
  • Pipeline finished with Failed
    7 months ago
    Total: 163s
    #193524
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Pipeline finished with Running
    7 months ago
    #193538
  • ๐Ÿ‡ต๐Ÿ‡นPortugal jcnventura

    jcnventura โ†’ changed the visibility of the branch 3352408-fix-the-issues to hidden.

  • Pipeline finished with Failed
    6 months ago
    Total: 185s
    #206871
Production build 0.71.5 2024