Fix the issues reported by phpcs

Created on 11 April 2023, over 1 year ago
Updated 11 October 2023, about 1 year ago

Problem/Motivation

FILE: /home/elc/source/drupal-contrib/fraction/src/Plugin/views/field/FractionField.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/src/Plugin/views/field/Fraction.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/src/Plugin/views/filter/Fraction.php
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
54 | ERROR | The array declaration extends to column 139 (the limit is 80). The array
| | content should be split up over multiple lines
58 | ERROR | The array declaration extends to column 139 (the limit is 80). The array
| | content should be split up over multiple lines
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/src/Plugin/migrate/process/DecimalFraction.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\migrate\MigrateExecutableInterface.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: ...source/drupal-contrib/fraction/src/Plugin/Field/FieldFormatter/FractionFormatterBase.php
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
68 | ERROR | The array declaration extends to column 114 (the limit is 80). The array
| | content should be split up over multiple lines
69 | ERROR | The array declaration extends to column 114 (the limit is 80). The array
| | content should be split up over multiple lines
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/tests/src/Unit/process/DecimalFractionTest.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\fraction\Plugin\migrate\process\DecimalFraction.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/tests/src/Unit/FractionTest.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\fraction\Fraction.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/tests/src/Functional/FractionFieldTest.php
----------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\StringTranslation\StringTranslationTrait.
140 | ERROR | [ ] The array declaration extends to column 151 (the limit is 80). The array
| | content should be split up over multiple lines
148 | ERROR | [ ] The array declaration extends to column 148 (the limit is 80). The array
| | content should be split up over multiple lines
260 | ERROR | [ ] The array declaration extends to column 151 (the limit is 80). The array
| | content should be split up over multiple lines
269 | ERROR | [ ] The array declaration extends to column 148 (the limit is 80). The array
| | content should be split up over multiple lines
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: ...e/drupal-contrib/fraction/tests/src/Kernel/Plugin/Constraints/FractionConstraintTest.php
----------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------
82 | ERROR | The array declaration extends to column 82 (the limit is 80). The array
| | content should be split up over multiple lines
87 | ERROR | The array declaration extends to column 91 (the limit is 80). The array
| | content should be split up over multiple lines
93 | ERROR | The array declaration extends to column 87 (the limit is 80). The array
| | content should be split up over multiple lines
98 | ERROR | The array declaration extends to column 100 (the limit is 80). The array
| | content should be split up over multiple lines
104 | ERROR | The array declaration extends to column 101 (the limit is 80). The array
| | content should be split up over multiple lines
110 | ERROR | The array declaration extends to column 98 (the limit is 80). The array
| | content should be split up over multiple lines
----------------------------------------------------------------------------------------------

FILE: /home/elc/source/drupal-contrib/fraction/tests/src/Kernel/FractionFieldTest.php
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

Time: 518ms; Memory: 12MB

Steps to reproduce

The command and arguments used is:-

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ~/source/drupal-contrib/fraction

Proposed resolution

Fix the above issue.

📌 Task
Status

RTBC

Version

2.0

Component

Code

Created by

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