Fix the issues reported by phpcs

Created on 10 July 2023, over 1 year ago
Updated 13 July 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/math_field/

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/math_field/src/Calculator.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/math_field/src/Plugin/Field/FieldFormatter/MathFieldFormatter.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldDefinitionInterface.
32 | ERROR | [ ] Missing member variable doc comment
34 | ERROR | [ ] Missing member variable doc comment
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/math_field/tests/src/Unit/CalculatorTest.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------
15 | ERROR | Missing member variable doc comment
45 | ERROR | The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

Time: 272ms; Memory: 10MB

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

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