Drupal Coding Standard As Per phpcs --standard=Drupal

Created on 16 August 2022, about 2 years ago
Updated 10 August 2023, over 1 year ago

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml post_api/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(

FILE: C:\Users\SI-001\Downloads\post_api\post_api.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
45 | WARNING | [x] '@todo: add config setting for granular logging.' should
| | match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\post_api\src\Form\PostApiQueueForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
19 | WARNING | The class short comment should describe what the class does and
| | not simply repeat the class name
--------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\post_api\src\Form\PostApiSettingsForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
13 | WARNING | The class short comment should describe what the class does and
| | not simply repeat the class name
--------------------------------------------------------------------------------

FILE: ...sers\SI-001\Downloads\post_api\src\Plugin\QueueWorker\PostApiQueueBase.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
176 | ERROR | [x] Use null coalesce operator instead of ternary operator.
178 | ERROR | [x] Use null coalesce operator instead of ternary operator.
226 | WARNING | [x] '@todo: allow API rate limit customization based on more
| | granular time' should match the format '@todo Fix problem
| | X here.'
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\post_api\src\Service\AddToQueue.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
80 | WARNING | [x] '@todo: display warning if uid is not set for the item.'
| | should match the format '@todo Fix problem X here.'
97 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 5.06 secs; Memory: 10MB

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India Rakhi Soni

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