Problem/Motivation

Getting following warnings.

FILE: /var/www/html/modules/contrib/taxonomy_bootstrap_accordion/src/Plugin/Block/TaxonomyMenuBlock.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
131 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
134 | WARNING | Unused variable $machine.
154 | WARNING | Vocabulary::load calls should be avoided in classes, use dependency injection instead
224 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------

Time: 729ms; Memory: 6MB

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/taxonomy_bootstrap_accordion/

Proposed resolution

Above warnings need to be fixed.

CommentFileSizeAuthor
#2 3350069-2.patch1.86 KBsamitk

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.86 KB

Above warnings has been fixed.

adil_siddiqui’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied successfully and all the warnings specified are resolved...Marking as RTBC

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Priority: Normal » Minor
Issue tags: -Coding standards Phpcs, -Phpcs Drupal coding standard issue

shelane’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. I also updated the use statements order.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.