Fix the issues reported by phpcs

Created on 12 June 2023, over 1 year ago
Updated 16 June 2023, over 1 year ago

Problem/Motivation

FILE: ...l/vb/d_cont/simple_sitemap_page_manager/simple_sitemap_page_manager.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
12 | WARNING | [ ] Doc comment indicates hook_form_alter() but function
| | signature is
| | "simple_sitemap_page_manager_form_page_manage_variant_configure_form_alter"
| | instead of "simple_sitemap_page_manager_form_alter". Did
| | you mean hook_form_FORM_ID_alter()?
53 | WARNING | [ ] #description values usually have to run through t() for
| | translation
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...imple_sitemap_page_manager/src/Controller/SimpleSitemapPagesController.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
30 | ERROR | Parameter $settings is not described in comment
33 | ERROR | Doc comment for parameter $form_helper does not match actual
| | variable name $settings
--------------------------------------------------------------------------------

FILE: ...ml/vb/d_cont/simple_sitemap_page_manager/src/SimpleSitemapPagesManager.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the class does and
| | not simply repeat the class name
--------------------------------------------------------------------------------

FILE: ..._page_manager/src/Plugin/simple_sitemap/UrlGenerator/PagesUrlGenerator.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
49 | ERROR | [ ] Parameter $settings is not described in comment
58 | ERROR | [ ] Doc comment for parameter $generator does not match actual
| | variable name $pages_manager
103 | ERROR | [x] Expected 1 space before opening brace; found 2
156 | ERROR | [x] Expected 1 space before opening brace; found 2
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 113ms; 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 simple_sitemap_page_manager/

Proposed resolution

Fix the issues reported for Drupal and DrupalPractice coding standards

Remaining tasks

Patch Review

📌 Task
Status

Fixed

Version

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

Production build 0.71.5 2024