Fix the issues reported by phpcs

Created on 3 July 2023, over 1 year ago
Updated 6 July 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/menu_parser_php/tests/src/Unit/ParserTest.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
130 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
148 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
148 | ERROR | [x] Expected one space after the comma, 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/menu_parser_php/src/Form/SettingsForm.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
52 | ERROR | [x] Expected 1 blank line after function; 0 found
53 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/menu_parser_php/src/RemoteMenuLink.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
27 | ERROR | [x] Separate the @param and @return sections by a blank line.
44 | ERROR | [x] Expected 1 space after "=>"; 2 found
45 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | class
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/menu_parser_php/src/RemoteMenuParser.php
----------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------
29 | ERROR | [x] Data types in @var tags need to be fully namespaced
43 | ERROR | [x] Data types in @var tags need to be fully namespaced
67 | ERROR | [x] Separate the @param and @return sections by a blank line.
67 | ERROR | [x] Data types in @return tags need to be fully namespaced
89 | ERROR | [x] Expected one space after the comma, 0 found
89 | ERROR | [x] Expected one space after the comma, 0 found
90 | ERROR | [x] Expected one space after the comma, 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

Time: 171ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig menu_parser_php/

Remaining tasks

Patch review

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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 @urvashi_vora
  • 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/Form/SettingsForm.php...
    Checking patch src/RemoteMenuLink.php...
    Checking patch src/RemoteMenuParser.php...
    Checking patch tests/src/Unit/ParserTest.php...
    Applied patch src/Form/SettingsForm.php cleanly.
    Applied patch src/RemoteMenuLink.php cleanly.
    Applied patch src/RemoteMenuParser.php cleanly.
    Applied patch tests/src/Unit/ParserTest.php cleanly.

    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 menu_parser_php/

    Applied to Menu Parser PHP module with 1.0.0-alpha2 version and with the Drupal core version of 9.5.x.

    Please see the attached screenshots for your reference.

    I'm moving this now to RTBC.

    Thank you!

  • Status changed to Fixed over 1 year ago
  • 🇸🇮Slovenia alecsmrekar

    Thanks, committed to 1.0.x branch

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024