Fix the issues reported by phpcs

Created on 7 July 2023, over 1 year ago
Updated 18 September 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 node_type_class

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\node_type_class\node_type_class.module
--------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 14 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 19 | ERROR | [x] Short array syntax must be used to define arrays
 24 | ERROR | [x] Short array syntax must be used to define arrays
 25 | ERROR | [x] Short array syntax must be used to define arrays
 28 | ERROR | [x] Short array syntax must be used to define arrays
 40 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

Time: 646ms; Memory: 6MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

2.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 sidharth_soman Bangalore

    All issues fixed. Please review the patch.

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

    Hi sidharth_soman,

    I reviewed patch #2, applied against Node type class 2.0.1, and confirmed it fixes all the issues reported by phpcs.

    I added screenshots for reference.
    Thank you.

Production build 0.71.5 2024