Fix the issues reported by phpcs

Created on 11 January 2020, over 4 years ago
Updated 21 December 2023, 6 months ago

PHP_CodeSniffer reports the following errors/warnings that should be fixed, when they are not false positive.

FILE: /Users/specbee/Sites/Projects/entity_vistiors/entity_visitors.page.inc
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------
 24 | WARNING | Unused variable $entity_visitors.
----------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/entity_visitors.info.yml
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
-----------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/Form/EntityVisitorsSettingsForm.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: /Users/specbee/Sites/Projects/entity_vistiors/src/Form/EntityVisitiorsConfig.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
  11 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
  57 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 114 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/Form/EntityVisitorsForm.php
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
 37 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/EntityVisitorsListBuilder.php
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
 37 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/Service/EntityVisitorsManager.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
  16 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
 133 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 144 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/EventSubscriber/SendMailOnEntityVisitedSubscriber.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 52 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/entity_vistiors/src/EventSubscriber/EntityRouteMatchSubscriber.php
------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
 64 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------

Time: 263ms; Memory: 10MB

Steps to reproduce

Run phpcs --standard=โ€œDrupal,DrupalPracticeโ€ --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js.

๐Ÿ“Œ Task
Status

Needs review

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia rksyravi New Delhi, ๐Ÿ‡ฎ๐Ÿ‡ณ

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia surya pratap

    surya pratap โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to surya pratap
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia surya pratap

    FILE: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/entity_visitors.page.inc
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------
    24 | WARNING | Unused variable $entity_visitors.
    -----------------------------------------------------------------------------------------------------

    FILE: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/entity_visitors.info.yml
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------
    1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    -----------------------------------------------------------------------------------------------------

    FILE: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/src/Form/EntityVisitorsSettingsForm.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: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/src/Form/EntityVisitiorsConfig.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------
    11 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    57 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    114 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------

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

    FILE: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/src/EventSubscriber/SendMailOnEntityVisitedSubscriber.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
    52 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
    --------------------------------------------------------------------------------------------------------------------------------------

    FILE: /var/www/html/contribution/web/modules/contrib/entity_vistiors-3105864/src/Service/EntityVisitorsManager.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------
    16 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    133 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    144 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead

  • Merge request !1phpcs issues fixed โ†’ (Open) created by surya pratap
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command and arguments have been used, and which report that command shown.

    https://pareview.sh/pareview/https-git.drupal.org-project-entity_vistior... is not accessible and it is not possible to get what warnings/errors must be fixed.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia imustakim Ahmedabad

    Issue summary updated.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia imustakim Ahmedabad
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    zniki.ru โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
Production build 0.69.0 2024