Fix the issues reported by phpcs

Created on 29 June 2023, over 1 year ago
Updated 29 December 2023, 11 months ago

Problem/Motivation

FILE: /var/www/html/drupal9_test/code/modules/contrib/critical_css/src/Form/SettingsForm.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
16 | ERROR | Missing short description in doc comment
--------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal9_test/code/modules/contrib/critical_css/src/Asset/CssCollectionRenderer.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
75 | WARNING | [ ] Unused variable $config.
166 | WARNING | [x] 'TODO Find a better way to set the onload attribute:' should match the format '@todo Fix problem X here.'

FILE: /var/www/html/drupal9_test/code/modules/contrib/critical_css/tests/src/Unit/CriticalCssProviderTest.php
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
14 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements

🐛 Bug report
Status

Fixed

Version

1.19

Component

Code

Created by

🇮🇳India yashmalviya

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

Comments & Activities

  • Issue created by @yashmalviya
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India yashmalviya

    I have fixed the errors and warnings. Please review the patch.

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi @yashmalviya,

    I reviewed your changes and confirmed the Patch was applied cleanly.

    Checking patch src/Asset/CssCollectionRenderer.php...
    Checking patch src/Form/SettingsForm.php...
    Checking patch tests/src/Unit/CriticalCssProviderTest.php...
    Applied patch src/Asset/CssCollectionRenderer.php cleanly.
    Applied patch src/Form/SettingsForm.php cleanly.
    Applied patch tests/src/Unit/CriticalCssProviderTest.php cleanly.

    And all PHPCS errors have been fixed.

    I ran this command:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml


    Applied to Critical CSS module with 8.x-1.19 version and with the Drupal core version of 9.5.x.

    Attaching screenshots and moving this to RTBC,

    Thanks.

    • albertosilva committed 9f092cff on 8.x-1.x
      Issue #3371298 by yashmalviya, roberttabigue: Fix the issues reported by...
  • Assigned to albertosilva
  • Status changed to Fixed 11 months ago
  • 🇪🇸Spain albertosilva Basque Country

    Hi,

    Thanks for your patch, I've already merged it and will publish a new version in a couple of days.

  • Status changed to Fixed 11 months ago
  • 🇪🇸Spain albertosilva Basque Country
Production build 0.71.5 2024