Fix the issues reported by phpcs

Created on 17 May 2023, over 1 year ago
Updated 13 June 2023, over 1 year ago

Problem/Motivation

Found these issues reported by phpcs:

FILE: ...w/drupalorgsite/docroot/modules/contrib/mixitup_views/tests/src/Unit/MixItUpDefaultOptionsServiceTest.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class
    |         | name
---------------------------------------------------------------------------------------------------------------


FILE: ...denttrainees/New/drupalorgsite/docroot/modules/contrib/mixitup_views/tests/src/Kernel/MixItUpFuncTest.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
 12 | WARNING | The class short comment should describe what the class does and not simply repeat the class
    |         | name
---------------------------------------------------------------------------------------------------------------


FILE: ...inees/New/drupalorgsite/docroot/modules/contrib/mixitup_views/tests/src/Kernel/MixitUpFiltersFormTest.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
 14 | WARNING | The class short comment should describe what the class does and not simply repeat the class
    |         | name
---------------------------------------------------------------------------------------------------------------


FILE: ...studenttrainees/New/drupalorgsite/docroot/modules/contrib/mixitup_views/templates/mixitup_views.theme.inc
---------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
 122 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 123 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: ...s/studenttrainees/New/drupalorgsite/docroot/modules/contrib/mixitup_views/src/Form/MixitupFiltersForm.php
---------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class
    |         | name
 70 | WARNING | Vocabulary::load calls should be avoided in classes, use dependency injection instead
 81 | ERROR   | The array declaration extends to column 87 (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
---------------------------------------------------------------------------------------------------------------


FILE: /Users/studenttrainees/New/drupalorgsite/docroot/modules/contrib/mixitup_views/src/MixitupFunc.php
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
 164 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

Time: 441ms; Memory: 12MB

Steps to reproduce

Run this command in the module folder; phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml

Proposed resolution

Remaining tasks

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇵🇭Philippines paraderojether

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