Fix the issues reported by phpcs

Created on 6 July 2023, 12 months ago
Updated 11 January 2024, 6 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/html_processors/README.md
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
47 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...var/www/html/vb/d_cont/html_processors/src/Service/HrefToMediaReplacer.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ww/html/vb/d_cont/html_processors/config/schema/html_processors.schema.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
50 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 567ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig html_processors/

Remaining tasks

Patch review

šŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India urvashi_vora Madhya Pradesh, India

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

Merge Requests

Comments & Activities

  • Issue created by @urvashi_vora
  • Status changed to Needs work 8 months ago
  • šŸ‡®šŸ‡³India Ashutosh Ahirwal India

    Provided patch get applied cleanly but still some issure remains

    Used command:-
    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/html_processors

    Remaining issues:-
    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/modules/html_processors_tampers/src/Plugin/Tamper/HrefToMedia.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\html_processors\Service\MediaGenerator.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/modules/html_processors_tampers/src/Plugin/Tamper/HtmlToGutenberg.php
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\html_processors\Service\HtmlGutenbergParser.
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Plugin/Action/HrefToMedia.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
    7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Plugin/Action/ConvertToGutenberg.php
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------
    10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Plugin\ContainerFactoryPluginInterface.
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Plugin/HtmlGutenbergProcessor/TableCell.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    ----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Plugin/HtmlGutenbergProcessor/Table.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Plugin/HtmlGutenbergProcessor/Image.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/HtmlGutenbergProcessorConfigTrait.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    ----------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Service/MediaGenerator.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Utility\Token.
    -----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/html_processors/src/Service/HtmlGutenbergParser.php
    -------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\html_processors\HtmlGutenbergProcessorBase.
    -------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------------------

    Time: 479ms; Memory: 12MB

  • Status changed to Needs review 8 months ago
  • šŸ‡®šŸ‡³India Ashutosh Ahirwal India

    Providing updated patch with all fixes.

  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied the patch #3 and. tested it and I confirmed that it fixes all the PHPCS issues, retaining the status to needs review so that others could confirm. RTBC +1 for me

    āžœ  html_processors git:(1.0.x) curl https://www.drupal.org/files/issues/2023-10-30/phpcs-issue-fixes_0.patch | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  8709  100  8709    0     0  17891      0 --:--:-- --:--:-- --:--:-- 18451
    Checking patch README.md...
    Checking patch config/schema/html_processors.schema.yml...
    Checking patch modules/html_processors_tampers/src/Plugin/Tamper/HrefToMedia.php...
    Checking patch modules/html_processors_tampers/src/Plugin/Tamper/HtmlToGutenberg.php...
    Checking patch src/HtmlGutenbergProcessorConfigTrait.php...
    Checking patch src/Plugin/Action/ConvertToGutenberg.php...
    Checking patch src/Plugin/Action/HrefToMedia.php...
    Checking patch src/Plugin/HtmlGutenbergProcessor/Image.php...
    Checking patch src/Plugin/HtmlGutenbergProcessor/Table.php...
    Checking patch src/Plugin/HtmlGutenbergProcessor/TableCell.php...
    Checking patch src/Service/HrefToMediaReplacer.php...
    Checking patch src/Service/HtmlGutenbergParser.php...
    Checking patch src/Service/MediaGenerator.php...
    Applied patch README.md cleanly.
    Applied patch config/schema/html_processors.schema.yml cleanly.
    Applied patch modules/html_processors_tampers/src/Plugin/Tamper/HrefToMedia.php cleanly.
    Applied patch modules/html_processors_tampers/src/Plugin/Tamper/HtmlToGutenberg.php cleanly.
    Applied patch src/HtmlGutenbergProcessorConfigTrait.php cleanly.
    Applied patch src/Plugin/Action/ConvertToGutenberg.php cleanly.
    Applied patch src/Plugin/Action/HrefToMedia.php cleanly.
    Applied patch src/Plugin/HtmlGutenbergProcessor/Image.php cleanly.
    Applied patch src/Plugin/HtmlGutenbergProcessor/Table.php cleanly.
    Applied patch src/Plugin/HtmlGutenbergProcessor/TableCell.php cleanly.
    Applied patch src/Service/HrefToMediaReplacer.php cleanly.
    Applied patch src/Service/HtmlGutenbergParser.php cleanly.
    Applied patch src/Service/MediaGenerator.php cleanly.
    āžœ  html_processors git:(1.0.x) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml html_processors 
    āžœ  contrib git:(master) āœ— 
  • First commit to issue fork.
  • Merge request !4Fixed the files phpcs issues ā†’ (Open) created by realsp
  • Status changed to RTBC 6 months ago
  • šŸ‡®šŸ‡³India realsp

    Applied the #3 patch cleanly, fixes all the phpcs issues, RTBC +1.
    I've created MR applying the changes.

Production build 0.69.0 2024