Fix the issues reported by phpcs

Created on 19 May 2023, over 1 year ago
Updated 28 June 2024, 6 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig shows the following errors/warnings, which should be fixed.

FILE: ./quick_search_index_clone_8.x-1.x/quick_search_index_clone.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 0 found

FILE: ./quick_search_index_clone_8.x-1.x/src/Form/IndexDuplicateForm.php
  15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
 122 | ERROR   | The array declaration extends to column 149 (the limit is 80). The array content should be split up over multiple
     |         | lines

FILE: ./quick_search_index_clone_8.x-1.x/README.md
 14 | WARNING | [ ] Line exceeds 80 characters; contains 129 characters
 15 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
 30 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 47 | ERROR   | [x] Expected 1 newline at end of file; 0 found
๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Shanu Chouhan

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 @Shanu Chouhan
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Shanu Chouhan

    Here's a patch for it.

  • Assigned to dineshkumarbollu
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

    Hi

    After appliny the patch it still found errors

    vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/quick_search_index_clone-3361429/

    FILE: /var/www/html/vbd9/web/modules/contrib/quick_search_index_clone-3361429/quick_search_index_clone.routing.yml
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
    11 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------

    FILE: /var/www/html/vbd9/web/modules/contrib/quick_search_index_clone-3361429/README.md
    ---------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
    ---------------------------------------------------------------------------------------
    14 | WARNING | [ ] Line exceeds 80 characters; contains 129 characters
    15 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
    30 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
    47 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ---------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------

    Time: 231ms; Memory: 12MB

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi dineshkumarbollu,

    I applied your patch #4 and confirmed that all phpcs errors mentioned were fixed, but I retain this ticket to be in needs review because I want to hear from you or from the maintainer if the remaining phpcs warnings should be fixed or not.

    Please look at the attached screenshot for your reference.

    Thank you

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    -The Quick Search API Clone is a Drupal module that allows you to quickly clone an existing search API index and its dependencies, 
    -like fields, facets, and processors. It also lets you customize the settings of the newly created index, 
    +The Quick Search API Clone is a Drupal module that allows you to quickly clone
    +an existing search API index and its dependencies, 
    +like fields, facets, and processors. It also lets you customize the settings of
    +the newly created index, 
     such as the index name, server, and filters.

    Avoiding that lines exceed 80 characters does not mean making them 23-character long.

     /**
    - * Class IndexDuplicateForm.
    + * Class of IndexDuplicateForm.

    That is still repeating the class name without describing what the class purpose is.

  • Assigned to imustakim
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada

    Patch updated and interdiff attached.
    Please review.

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

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !2Fixed phpcs issues. โ†’ (Open) created by Unnamed author
  • Status changed to RTBC 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Hello,

    I reviewed #10 and confirmed it fixes all the errors and warnings reported by phpcs and also raised MR for the same. Please review.

    Thank You.

Production build 0.71.5 2024