Fix the issues reported by phpcs

Created on 7 July 2023, 12 months ago
Updated 22 January 2024, 5 months ago

Running shows the following errors/warnings which needs to be fixed.

FILE: ./lightning_layout.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 112 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./modules/lightning_banner_block/tests/src/Functional/DependenciesTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | Missing short description in doc comment
----------------------------------------------------------------------


FILE: ./modules/lightning_landing_page/tests/src/Functional/DependenciesTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | Missing short description in doc comment
----------------------------------------------------------------------


FILE: ./modules/lightning_map_block/tests/src/Functional/DependenciesTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  7 | ERROR | Missing short description in doc comment
 28 | ERROR | Public method name "DependenciesTest::testSimpleGMap"
    |       | is not in lowerCamel format
----------------------------------------------------------------------


FILE: ./src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 40 | ERROR | [x] Do not append variable name "$module_handler" to
    |       |     the type declaration in a member variable comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 156ms; Memory: 6MB
📌 Task
Status

RTBC

Version

3.0

Component

Code

Created by

🇮🇳India roshni27

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 @roshni27
  • Issue was unassigned.
  • Status changed to Needs review 12 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    9 pass
  • 🇮🇳India roshni27

    Some comment description remain because which are better know to maintainer and all remaining issues solve by me. Please review the patch.

  • Status changed to Needs work 5 months ago
  • 🇮🇳India Ashutosh Ahirwal India

    Provided patch in #2 get applied cleanly but still there are some remaining errors found.

    Used command with arguments:-
    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/lightning_layout

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/lightning_layout/modules/lightning_landing_page/tests/src/Functional/DependenciesTest.php
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    7 | ERROR | Missing short description in doc comment
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/lightning_layout/modules/lightning_map_block/tests/src/Functional/DependenciesTest.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    7 | ERROR | Missing short description in doc comment
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/lightning_layout/modules/lightning_banner_block/tests/src/Functional/DependenciesTest.php
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    7 | ERROR | Missing short description in doc comment
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Time: 361ms; Memory: 10MB

  • Status changed to Needs review 5 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 5 months ago
    9 pass
  • 🇮🇳India Ashutosh Ahirwal India

    Providing updated patch with all phpcs issue fixes.
    Please review it

  • Status changed to RTBC 5 months ago
  • 🇵🇭Philippines paraderojether

    Hi Ashutosh Ahirwal,

    I reviewed patch #4 and applied it against Lightning Layout 3.0.x-dev with Drupal core version 10.1.7 and confirmed it fixes the issues reported bu phpcs.

    I added screenshots for reference.
    Thank you.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 5 months ago
    9 pass
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
Production build 0.69.0 2024