Coding Standard PHPCS

Created on 29 June 2023, over 1 year ago
Updated 19 July 2023, over 1 year ago
FILE: /var/www/html/drupal8/web/modules/entity_information/entity_information.links.menu.yml
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/entity_information.info.yml
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
 1 | WARNING | [ ] Remove "project" from the info file, it will be added by drupal.org packaging automatically
 9 | ERROR   | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/src/EntityInformationManager.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 203 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/src/Controller/EntityInformationController.php
---------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------
 26 | ERROR | [ ] Missing parameter comment
 60 | ERROR | [x] Expected 1 space after "=>"; 0 found
 60 | ERROR | [x] Expected 1 space after "=>"; 0 found
 79 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/src/Plugin/EntityInformation/EntityInformationMenuLink.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 12 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/src/Plugin/EntityInformation/EntityInformationPathAlias.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
  11 | WARNING | [x] Unused use statement
 115 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/src/Form/SettingsForm.php
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
 11 | ERROR | [x] Missing class doc comment
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/entity_information/tests/src/Functional/EntityInformationAccessTest.php
---------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
  40 | ERROR   | [ ] Class property $user_with_permission should use lowerCamel naming without underscores
  47 | WARNING | [ ] Unused variable $admin_user.
 107 | ERROR   | [x] Expected 1 blank line after function; 0 found
 108 | ERROR   | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------
📌 Task
Status

Fixed

Version

2.1

Component

Code

Created by

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

Comments & Activities

  • Issue created by @Neeraj333
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    I reviewed patch #2, and there are still remaining warning reported by phpcs shown below:

    FILE: ...Drupal/drupalorg-issues-site/docroot/modules/contrib/entity_information/entity_information.info.yml
    ---------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging
       |         | automatically
     1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging
       |         | automatically
     1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging
       |         | automatically
    ---------------------------------------------------------------------------------------------------------
    
    Time: 550ms; Memory: 10MB

    Please check.
    Thank you.

  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    Reviewed patch #2. There are no errors/warning.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Assigned to wilfred waltman
  • 🇳🇱Netherlands wilfred waltman

    Thanks. I will take a look at the patch soon.

  • Issue was unassigned.
  • Status changed to Fixed over 1 year ago
  • 🇳🇱Netherlands wilfred waltman

    Fixed in new release 2.10.

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

Production build 0.71.5 2024