Coding Standard Issues

Created on 6 December 2024, 3 months ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

FILE: .../web/modules/custom/visual_website_optimizer/src/EventSubscriber/VwoSmartCodeEventSubscriber.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------------------
133 | ERROR | [x] Parameter $route_match has null default value, but is not marked as nullable.
134 | ERROR | [x] Parameter $current_user has null default value, but is not marked as nullable.
135 | ERROR | [x] Parameter $module_handler has null default value, but is not marked as nullable.
136 | ERROR | [x] Parameter $current_path_stack has null default value, but is not marked as nullable.
137 | ERROR | [x] Parameter $path_matcher has null default value, but is not marked as nullable.
138 | ERROR | [x] Parameter $user_data has null default value, but is not marked as nullable.
165 | ERROR | [x] Parameter $custom_url has null default value, but is not marked as nullable.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/visual_website_optimizer/visual_website_optimizer.module
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
20 | ERROR | [x] Parameter $custom_url has null default value, but is not marked as nullable.
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇵🇪Peru alyaj2a

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024