Fix Phpcs error reported by Gitlab CI

Created on 28 February 2024, 9 months ago
Updated 26 April 2024, 7 months ago

Problem/Motivation

After configuring Gitlab CI, There are some code style issues highlighted by phpcs that we should fix
https://git.drupalcode.org/project/packthub_ebook_integration/-/jobs/876283

Proposed resolution

Fix Flagged errors/ Warnings

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia d-xpert Chandigarh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @d-xpert
  • First commit to issue fork.
  • Pipeline finished with Failed
    9 months ago
    Total: 521s
    #111475
  • Pipeline finished with Failed
    9 months ago
    Total: 510s
    #111488
  • Pipeline finished with Failed
    9 months ago
    Total: 1106s
    #111501
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Neha-Verma

    Neha-Verma โ†’ changed the visibility of the branch 3424238-Fix-phpcs to hidden.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Neha-Verma

    Fixed most of the phpcs error reported by Gitlab CI.

    Issues remaining:

    FILE: ...es/custom/packthub_ebook_integration-3424238/src/Plugin/ProductsAssets.php
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     77 | ERROR | [x] Space found after square bracket; expected "[CURLOPT_URL" but
        |       |     found "[
        |       |           CURLOPT_URL"
        |       |     (Squiz.Arrays.ArrayBracketSpacing.SpaceAfterBracket)
     86 | ERROR | [x] Space found before square bracket; expected ",]" but found ",
        |       |         ]" (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: .../modules/custom/packthub_ebook_integration-3424238/src/Plugin/Products.php
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
     158 | ERROR | [x] Space found after square bracket; expected "[CURLOPT_URL"
         |       |     but found "[
         |       |           CURLOPT_URL"
         |       |     (Squiz.Arrays.ArrayBracketSpacing.SpaceAfterBracket)
     167 | ERROR | [x] Space found before square bracket; expected ",]" but found
         |       |     ",
         |       |         ]" (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
     271 | ERROR | [ ] Public method name "Products::setProductID" is not in
         |       |     lowerCamel format
         |       |     (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: ...ustom/packthub_ebook_integration-3424238/src/Form/EbookContentTypeForm.php
    --------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 6 LINES
    --------------------------------------------------------------------------------
     61 | ERROR | [x] Space found after square bracket; expected "['#type'" but
        |       |     found "[
        |       |           '#type'"
        |       |     (Squiz.Arrays.ArrayBracketSpacing.SpaceAfterBracket)
     71 | ERROR | [x] Space found before square bracket; expected ",]" but found ",
        |       |           ]"
        |       |     (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
     72 | ERROR | [x] Space found before square bracket; expected ",]" but found ",
        |       |         ]" (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
     77 | ERROR | [x] Space found before square bracket; expected ",]" but found ",
        |       |         ]" (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
     85 | ERROR | [x] Space found after square bracket; expected "['#type'" but
        |       |     found "[
        |       |           '#type'"
        |       |     (Squiz.Arrays.ArrayBracketSpacing.SpaceAfterBracket)
     88 | ERROR | [x] Space found before square bracket; expected ",]" but found ",
        |       |         ]" (Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket)
    
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Jasjeet Kaur Brar

    Jasjeet Kaur Brar โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Raveen Kumar

    All the Phpcs error reported by Gitlab CI are fixed!!

  • Status changed to RTBC 9 months ago
  • Pipeline finished with Failed
    9 months ago
    Total: 3693s
    #111683
  • ๐Ÿ‡ฒ๐Ÿ‡ผMalawi chancenyasulu

    Updates will be in next release

  • Status changed to Fixed 8 months ago
Production build 0.71.5 2024