Fix the issues reported by phpcs

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

Problem/Motivation
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/push_framework-2.2.9

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/push_framework-2.2.9/push_framework/src/Plugin/Action/Notify.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
41 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [x] Missing function doc comment
53 | ERROR | [x] Missing function doc comment
92 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/push_framework-2.2.9/push_framework/src/Plugin/DanseRecipientSelection/DirectPush.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\danse\PayloadInterface.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/push_framework-2.2.9/push_framework/src/Plugin/migrate/destination/BlockPushUserData.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\migrate\Row.

Steps to reproduce
Excute the command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/push_framework-2.2.9

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.2

Component

Code

Created by

🇮🇳India indrapatil 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

Production build 0.71.5 2024