Fix the issues reported by phpcs

Created on 11 July 2023, over 1 year ago

Problem/Motivation

C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig twig_json_decode

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\twig_json_decode\src\JsonToArray.php
------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 28 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
 30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
 31 | ERROR | [x] Expected 1 blank line after function; 0 found
 32 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

Time: 536ms; Memory: 6MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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 @sidharth_soman
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Jaspreet-Kaur

    Applied patch #2 on Drupal 9.5.x and it seems to be all errors are fixed.

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

    Hi,

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

    Checking patch src/JsonToArray.php...
    Applied patch src/JsonToArray.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,twig twig_json_decode/

    Successfully applied to Twig JSON Decode module against 1.0.x-dev version and with the Drupal core version of 9.5.x.

    Please see the attached files for reference.

    I'm moving this now to RTBC.

    Thank you!

Production build 0.71.5 2024