FIx the issues reported by phpcs

Created on 17 July 2023, over 1 year ago
Updated 20 July 2023, over 1 year ago

Problem/Motivation

Find some issues through phpcs cmd

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/access_token_auth/README.md
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------
  2 | WARNING | Line exceeds 80 characters; contains 111 characters
  9 | WARNING | Line exceeds 80 characters; contains 294 characters
 12 | WARNING | Line exceeds 80 characters; contains 105 characters
 14 | WARNING | Line exceeds 80 characters; contains 510 characters
 17 | WARNING | Line exceeds 80 characters; contains 210 characters
 23 | WARNING | Line exceeds 80 characters; contains 91 characters
 25 | WARNING | Line exceeds 80 characters; contains 108 characters
 37 | WARNING | Line exceeds 80 characters; contains 96 characters
 42 | WARNING | Line exceeds 80 characters; contains 212 characters
 45 | WARNING | Line exceeds 80 characters; contains 198 characters
 48 | WARNING | Line exceeds 80 characters; contains 439 characters
 51 | WARNING | Line exceeds 80 characters; contains 412 characters
 54 | WARNING | Line exceeds 80 characters; contains 182 characters
 57 | WARNING | Line exceeds 80 characters; contains 130 characters
 74 | WARNING | Line exceeds 80 characters; contains 85 characters
-------------------------------------------------------------------------------------------

Use below command with arguments
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/access_token_auth

Proposed resolution

I have fixed all the issues reportrd by phpcs

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

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 @sonam_sharma
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines kenyoOwen

    Hi sonam_sharma

    When I applied your patch it gives me this error

    Checking patch README.md...
    Checking patch access_token_auth.links.menu.yml...
    error: while searching for:
    description: 'Configuration options for the Access Token Auth module.'
    parent: system.admin_config_services
    route_name: access_token_auth.settings
    weight: 15
    error: patch failed: access_token_auth.links.menu.yml:3
    error: access_token_auth.links.menu.yml: patch does not apply
    Checking patch src/TokenManagerInterface.php...
    error: while searching for:
    /**
    * Get a valid token from a specific user.
    *
    * @param string $user_id
    * The user ID to get valid tokens from.
    *
    * @return \Drupal\access_token_auth\Model\Token|null

    error: patch failed: src/TokenManagerInterface.php:53
    error: src/TokenManagerInterface.php: patch does not apply

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    Providing updated patch with fixes and updating issue summary according to the result of phpcs command for 1.x branch.
    Please review.

  • First commit to issue fork.
  • @frederikvho opened merge request.
  • 🇧🇪Belgium Frederikvho Belgium

    Hi,

    I still encountered plenty of whitespace errors while applying the patch, so I ran it again using the --whitespace=fix option.
    I have created an issue fork and opened a merge request.

    The issue should be fixed now. Please review the merge request.

    Thanks!

  • 🇨🇷Costa Rica robert-arias

    Thank you everyone for participating so actively and trying to contribute! Unfortunately, the reported phpdocs issues are outdated. As for the other fixes regarding the README: markdown files should be excluded from phpdocs checks, so the patches and MR aren't of much value, thought I appreciate the checks.

    For future reference, this module uses Drupal's phpdocs coding standards.

  • Status changed to Closed: outdated over 1 year ago
  • 🇧🇪Belgium Frederikvho Belgium

    Hi,

    It was actually the applying process of the patches that resulted in whitespace errors and not the running of a code sniffer.

    Nevertheless, you are saying that these fixes to the documentation had already been taken care of in another issue? Just double checking.

    Kind regards

Production build 0.71.5 2024