Fix the issues reported by phpcs

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

Needs review

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India himanshu_jhaloya Indore

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 @himanshu_jhaloya
  • Merge request !7fixed the some issue ā†’ (Open) created by himanshu_jhaloya
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
     /**
    - * Implements hook_layout_paragraphs_builder_controls() adds a publish link to
    - * the layout paragraphs controls.
    + * Implements hook_layout_paragraphs_builder_controls() adds a publish link to.
    + *
    + * The layout paragraphs controls.
      */

    The correct short description is Implements [hook name](). Eventually, an extra description can be added.

        * The tempstore service.
        *
        * @var \Drupal\layout_paragraphs\LayoutParagraphsLayoutTempstoreRepository
    +   *
    +   * @var \Drupal\Core\Render\RendererInterfaces
    +   *
    +   *  The renderer.
        */
    +
       protected $tempstore;
    +  protected $renderer;

    Each property must be described singularly.

    +  /**
    +   * The controller constructor.
    +   *
    +   * @var \Drupal\Core\Render\RendererInterface $renderer
    +   *   The renderer.
    +   */

    That is not the short description used for constructor methods.

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

    Besides the feedback of comment #5, these are also the unfixed errors of the changes you commited on MR!7. Please see:

    āžœ  layout_paragraphs_toggle_publish git:(1.x) curl https://git.drupalcode.org/project/layout_paragraphs_toggle_publish/-/merge_requests/7.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  3595    0  3595    0     0  12086      0 --:--:-- --:--:-- --:--:-- 12569
    patching file README.md
    patching file layout_paragraphs_toggle_publish.module
    patching file src/Controller/TogglePublish.php
    Hunk #4 FAILED at 84.
    1 out of 4 hunks FAILED -- saving rejects to file src/Controller/TogglePublish.php.rej
    āžœ  layout_paragraphs_toggle_publish git:(1.x) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig layout_paragraphs_toggle_publish
    
    FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/layout_paragraphs_toggle_publish/layout_paragraphs_toggle_publish.module
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     11 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
        |         | hook_foo_BAR_ID_bar() for block templates."
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/layout_paragraphs_toggle_publish/src/Controller/TogglePublish.php
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------
      6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Ajax\InvokeCommand.
     33 | ERROR   | [ ] Only one @var tag is allowed in a member variable comment
     39 | ERROR   | [ ] Missing member variable doc comment
     88 | ERROR   | [ ] Comment indentation error, expected only 1 spaces
     88 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     90 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 152ms; Memory: 10MB

    Kindly check

    Thanks,
    Jake

  • Pipeline finished with Failed
    3 months ago
    Total: 185s
    #259930
  • Assigned to apaderno
  • Pipeline finished with Success
    3 months ago
    Total: 149s
    #259934
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Status changed to Needs review 3 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno ā†’ changed the visibility of the branch 3351070-fix-the-issues to hidden.

  • Pipeline finished with Failed
    3 months ago
    Total: 147s
    #259946
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

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

  • Pipeline finished with Failed
    3 months ago
    Total: 164s
    #259954
Production build 0.71.5 2024