Drupal calls should be avoided in classes, use dependency injection instead

Created on 26 April 2023, about 1 year ago
Updated 24 May 2023, about 1 year ago

FILE: /var/www/html/contribution/web/modules/contrib/axeptio/src/Axeptio.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
61 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

RTBC

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia himanshu_jhaloya Mandsaur

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

Comments & Activities

  • Issue created by @himanshu_jhaloya
  • @himanshu_jhaloya opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia himanshu_jhaloya Mandsaur
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines kenyoOwen

    Hi himanshu_jhaloya

    I applied your MR to the โ€œAxeptioโ€ module and confirmed that the Dependency injection issue mentioned is resolved. Please see the screenshots attached.

    For your review.
    Thank you.

  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    +  /**
    +   * Language Manager service.
    +   *
    +   * @var \Drupal\Core\Language\LanguageManagerInterface
    +   */
    +  protected $languageManager;
    +
    +   * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager
    +   *   Language Manager service.

    The description is missing a definite article.
    Only the first word must be capitalized.
    It is not necessary to say service.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil elber Brazil
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    +  /**
    +   * Language manager service.
    +   *
    +   * @var \Drupal\Core\Language\LanguageManagerInterface
    +   */
    +  protected $languageManager;
    +   * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager
    +   *   Language manager service.

    A definite article is missing in both the descriptions.
    It is not necessary to say service, as the language manager is a service, on Drupal.

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil elber Brazil
  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil lucienchalom

    The sugestion was fixed, and the Drupal call was changed to a dependency injection,
    RTBC

Production build 0.69.0 2024