Role::loadMultiple calls should be avoided in classes, use dependency injection instead

Created on 21 June 2023, almost 2 years ago
Updated 5 September 2023, over 1 year ago

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\content_access\src\Form\ContentAccessAdminSettingsForm.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
124 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India arti_parmar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update almost 2 years ago
    9 pass
  • 🇮🇳India arti_parmar

    Kindly review patch.

  • Status changed to Needs work almost 2 years ago
  • 🇵🇭Philippines kenyoOwen

    Hi arti_parmar

    I applied your patch and confirmed that the phpcs issue mentioned is resolved, but it added issues which is:

    FILE: /Users/studenttrainees/Project10/drupalorg10/docroot/modules/contrib/content_access/src/Form/ContentAccessAdminSettingsForm.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------------
    48 | ERROR | [x] Expected 1 space after asterisk; 2 found
    134 | ERROR | [x] Expected 1 space after "="; 2 found
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------

    Please see the screenshots attached.

    Thank you.

  • First commit to issue fork.
  • Status changed to Needs review almost 2 years ago
  • 🇧🇷Brazil elber Brazil

    Fix phpcs

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update almost 2 years ago
    9 pass
  • @elber opened merge request.
  • Status changed to Fixed over 1 year ago
  • 🇳🇴Norway gisle Norway

    This has been committed to the latest snapshot of 2.0.x-dev.

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

Production build 0.71.5 2024