Fix the issues reported by phpcs

Created on 7 July 2023, 12 months 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/pianoanalytics/

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/pianoanalytics/src/PianoAnalyticsUtils.php
-----------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------
5 | ERROR | Doc comment is empty
15 | ERROR | Doc comment is empty
32 | ERROR | Doc comment is empty
51 | ERROR | Doc comment is empty
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/pianoanalytics/src/Form/PianoAnalyticsDialog.php
---------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 6 WARNINGS AFFECTING 18 LINES
---------------------------------------------------------------------------------------------------------------------
38 | ERROR | Description for the @return value is missing
229 | WARNING | Possible useless method overriding detected
264 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
269 | ERROR | Doc comment is empty
272 | ERROR | Protected method name "PianoAnalyticsDialog::generateSDKInitScriptFile" is not in lowerCamel format
277 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
281 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
302 | ERROR | Doc comment is empty
305 | ERROR | Protected method name "PianoAnalyticsDialog::getSDKInitFilename" is not in lowerCamel format
309 | ERROR | Doc comment is empty
312 | ERROR | Protected method name "PianoAnalyticsDialog::generateSDKInitScript" is not in lowerCamel format
325 | ERROR | Doc comment is empty
338 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
351 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
362 | ERROR | Doc comment is empty
365 | ERROR | Protected method name "PianoAnalyticsDialog::getPAScriptFilename" is not in lowerCamel format
369 | ERROR | Doc comment is empty
372 | ERROR | Protected method name "PianoAnalyticsDialog::getPALibrary" is not in lowerCamel format
---------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/pianoanalytics/pianoanalytics.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 11 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [ ] Missing short description in doc comment
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\TranslatableMarkup.
70 | ERROR | [ ] Missing short description in doc comment
71 | ERROR | [ ] Missing parameter comment
71 | ERROR | [ ] Missing parameter type
73 | ERROR | [ ] Description for the @return value is missing
122 | ERROR | [ ] Missing short description in doc comment
123 | ERROR | [ ] Missing parameter comment
123 | ERROR | [ ] Missing parameter type
124 | ERROR | [ ] Missing parameter comment
125 | ERROR | [ ] Missing parameter comment
125 | ERROR | [ ] Missing parameter type
126 | ERROR | [ ] Missing parameter comment
126 | ERROR | [ ] Missing parameter type
128 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

Time: 304ms; Memory: 12MB

Steps to reproduce
Run this 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/pianoanalytics/

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇮🇳India Indra patil 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.69.0 2024