Fix the warnings/errors reported by PHP_CodeSniffer

Created on 4 July 2023, 12 months ago
Updated 25 October 2023, 8 months ago

Running

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig  /var/www
/html/VB/drupal-10.1.0/modules/contrib/decoupled_preview-1.0.0-beta1

shows the following errors/warnings, which should be fixed.

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/decoupled_preview-1.0.0-beta1/decoupled_preview/src/Resource/PreviewResource.php
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheableMetadata.
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/decoupled_preview-1.0.0-beta1/decoupled_preview/src/Controller/DecoupledPreviewController.php
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------


FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/decoupled_preview-1.0.0-beta1/decoupled_preview/decoupled_preview.module
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\Cache.
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Indra patil Bangalore

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

Comments & Activities

Production build 0.69.0 2024