Fix the issues reported by phpcs

Created on 23 May 2023, over 1 year ago
Updated 6 February 2024, 10 months ago

Problem/Motivation

Found this issues reported by phpcs:

FILE: ...nees/Drupal.org/drupalorg-site/docroot/modules/contrib/http2_server_push/tests/src/Functional/LinkHeaderTest.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
 10 | ERROR | [ ] Missing short description in doc comment
 36 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: ...Drupal.org/drupalorg-site/docroot/modules/contrib/http2_server_push/src/Asset/AssetHtmlTagRenderElementTrait.php
----------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------
  5 | ERROR | [x] Missing trait doc comment
 13 | ERROR | [ ] Description for the @return value is missing
 29 | ERROR | [ ] Description for the @return value is missing
 46 | ERROR | [ ] Description for the @return value is missing
 62 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: ...inees/Drupal.org/drupalorg-site/docroot/modules/contrib/http2_server_push/src/Http2ServerPushServiceProvider.php
----------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------
  9 | ERROR | Missing short description in doc comment
 26 | ERROR | Missing short description in doc comment
 27 | ERROR | Description for the @return value is missing
 33 | ERROR | Missing short description in doc comment
 34 | ERROR | Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------

Time: 213ms; Memory: 10MB

Steps to reproduce

Run this command in the module folder: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml

Proposed resolution

Remaining tasks

📌 Task
Status

Needs review

Version

1.1

Component

Code

Created by

🇵🇭Philippines paraderojether

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

Comments & Activities

  • Issue created by @paraderojether
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • @paraderojether opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇵🇭Philippines paraderojether

    Created an MR to fix the issues reported by phpcs.

    Please review.
    Thank You.

  • 🇮🇳India Raveen Kumar

    Hello guys,
    I have reviewed & implemented the MR! On my Drupal website having version 9.5.9 & PHP Version - 8.1
    The phpcs are fixed properly, As you can see in my attached screenshots.
    I am adding SS for reference. Please have a look.
    Can be moved to RTBC! ++
    And Thank You.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • 🇮🇳India Raveen Kumar

    I am adding a patch for it. Please review. And Thank You.

  • 🇮🇳India pray_12

    Hi ,
    I applied Patch #5 and encountered the following errors. But MR!1 solves all the errors.

    Checking patch http2_server_push.info.yml...
    error: while searching for:
    core: 8.x
    core_version_requirement: ^8 || ^9
    package: "Performance and scalability"
    
    # Information added by Drupal.org packaging script on 2019-12-30
    version: '8.x-1.1'
    project: 'http2_server_push'
    datestamp: 1577744010
    
    error: patch failed: http2_server_push.info.yml:4
    error: http2_server_push.info.yml: patch does not apply
    Checking patch src/Asset/AssetHtmlTagRenderElementTrait.php...
    error: while searching for:
    
    namespace Drupal\http2_server_push\Asset;
    
    trait AssetHtmlTagRenderElementTrait {
    
      /**
    
    error: patch failed: src/Asset/AssetHtmlTagRenderElementTrait.php:2
    error: src/Asset/AssetHtmlTagRenderElementTrait.php: patch does not apply
    Checking patch src/Http2ServerPushServiceProvider.php...
    error: while searching for:
    use Drupal\Core\DependencyInjection\ServiceProviderInterface;
    
    /**
     * @see \Drupal\http2_server_push\EventSubscriber\ConfigSubscriber::onSave()
     */
    class Http2ServerPushServiceProvider implements ServiceProviderInterface {
    
    error: patch failed: src/Http2ServerPushServiceProvider.php:7
    error: src/Http2ServerPushServiceProvider.php: patch does not apply
    Checking patch tests/src/Functional/LinkHeaderTest.php...
    error: while searching for:
    use Drupal\user\RoleInterface;
    
    /**
     * @group http2_server_push
     */
    class LinkHeaderTest extends BrowserTestBase {
    
    error: patch failed: tests/src/Functional/LinkHeaderTest.php:8
    error: tests/src/Functional/LinkHeaderTest.php: patch does not apply
    
Production build 0.71.5 2024