Standard coding drupal

Created on 14 December 2019, over 5 years ago
Updated 16 July 2025, 11 days ago

I found these errors when I using phpcs standard Drupal and standard Drupalpractice


$ phpcs --standard=Drupal .

FILE: ...oot\modules\social_post_facebook\src\Controller\FacebookPostController.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 70 | ERROR | [ ] Parameter $post_manager is not described in comment
 75 | ERROR | [ ] Doc comment for parameter $user_manager does not match actual
    |       |     variable name $logger_factory
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...e-dev\docroot\modules\social_post_facebook\src\FacebookPostAuthManager.php
--------------------------------------------------------------------------------
FOUND 1 ERRORS AFFECTING 1 LINES
--------------------------------------------------------------------------------
 12 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
    |       |     with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...v\docroot\modules\social_post_facebook\src\Plugin\Network\FacebookPost.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  94 | ERROR | [x] Data types in @param tags need to be fully namespaced
 117 | ERROR | [x] Data types in @throws tags need to be fully namespaced
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------




$ phpcs --standard=DrupalPractice .

FILE: ...oot\modules\social_post_facebook\src\Controller\FacebookPostController.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 183 | WARNING | Unused variable $email.
--------------------------------------------------------------------------------


FILE: ...e-dev\docroot\modules\social_post_facebook\src\FacebookPostAuthManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 67 | ERROR | The $_GET super global must not be accessed directly; inject the
    |       | request.stack service and use
    |       | $stack->getCurrentRequest()->query->get('code') instead
--------------------------------------------------------------------------------


FILE: ...e-dev\docroot\modules\social_post_facebook\src\Plugin\RulesAction\Post.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 162 | WARNING | Unused variable $provider_user_id.
--------------------------------------------------------------------------------

Time: 286ms; Memory: 6MB

📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇩Indonesia Adev22

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

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024