Coding Standard Issues

Created on 1 November 2024, 23 days ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

FILE: .../web/modules/custom/auto_block_translate/src/Form/TranslationForm.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\block_content\Entity\BlockContent.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/auto_block_translate/src/Plugin/Derivative/AutoBlockTranslateLocalTasks.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Plugin\Derivative\DeriverBase.
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/auto_block_translate/auto_block_translate.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityInterface.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

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

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Merge request !5Coding Standard Issues - #3485147 ā†’ (Open) created by alyaj2a
  • Pipeline finished with Success
    23 days ago
    Total: 285s
    #327247
  • Pipeline finished with Success
    23 days ago
    Total: 195s
    #327254
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi @alyaj2a,

    I applied your MR !5 and I confirmed that it fixes all the PHPCS issues of the module.

    āžœ  auto_block_translate git:(1.0.x) curl https://git.drupalcode.org/project/auto_block_translate/-/merge_requests/5.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2150    0  2150    0     0   4332      0 --:--:-- --:--:-- --:--:--  4405
    patching file auto_block_translate.module
    patching file 'src/Form/TranslationForm.php'
    patching file 'src/Plugin/Derivative/AutoBlockTranslateLocalTasks.php'
    āžœ  auto_block_translate git:(1.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml auto_block_translate 
    āžœ  contrib git:(main) āœ— 
    

    RTBC +1 from me, retaining the status to needs review for others to give their feedbacks.

Production build 0.71.5 2024