Fix the PHP_CodeSniffer issues reported by GitLab CI

Created on 6 May 2024, 10 months ago

GitLab CI reports the following PHP_CodeSniffer issues which should be fixed.

FILE: .../modules/custom/entity_usage/tests/src/Kernel/EntityUsageTrackFileTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is
   |       |     Drupal\Tests\file\Functional\FileFieldCreationTrait.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...usage/web/modules/custom/entity_usage/tests/src/Kernel/EntityUsageTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first
     |       |     wrong one is Drupal\Core\Entity\EntityInterface.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 255 | ERROR | [ ] Parameter $field_name is not described in comment
     |       |     (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...les/custom/entity_usage/tests/src/FunctionalJavascript/IntegrationTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 471 | ERROR | [x] Expected 1 blank line after function; 0 found
     |       |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 472 | ERROR | [x] The closing brace for the class must have an empty line
     |       |     before it
     |       |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...rc/FunctionalJavascript/EntityUsageLayoutBuilderEntityBrowserBlockTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 170 | ERROR | [x] Inline comments must start with a capital letter
     |       |     (Drupal.Commenting.InlineComment.NotCapital)
 229 | ERROR | [x] Inline comments must start with a capital letter
     |       |     (Drupal.Commenting.InlineComment.NotCapital)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...custom/entity_usage/tests/src/FunctionalJavascript/EmbeddedContentTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\file\Entity\File.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...age/tests/modules/entity_usage_test/src/Plugin/Block/DependenciesBlock.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 44 | ERROR | [x] Expected 1 blank line after function; 0 found
    |       |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 45 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
    |       |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../entity_usage/web/modules/custom/entity_usage/src/EntityUsageTrackBase.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\Core\Config\ConfigFactoryInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  17 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
  59 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 275 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...usage/web/modules/custom/entity_usage/src/EntityUsageQueueBatchManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Config\ConfigFactoryInterface.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../entity_usage/web/modules/custom/entity_usage/src/EntityUsageInterface.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 197 | ERROR | The text '@deprecated in branch 2.x. Use
     |       | \Drupal\entity_usage\EntityUsageInterface::listSources()
     |       | instead.' does not match the standard format: @deprecated in
     |       | %deprecation-version% and is removed from %removal-version%.
     |       | %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 197 | ERROR | Each @deprecated tag must have a @see tag immediately following
     |       | it (Drupal.Commenting.Deprecated.DeprecatedMissingSeeTag)
 219 | ERROR | The text '@deprecated in branch 2.x. Use
     |       | \Drupal\entity_usage\EntityUsageInterface::listTargets()
     |       | instead.' does not match the standard format: @deprecated in
     |       | %deprecation-version% and is removed from %removal-version%.
     |       | %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 219 | ERROR | Each @deprecated tag must have a @see tag immediately following
     |       | it (Drupal.Commenting.Deprecated.DeprecatedMissingSeeTag)
--------------------------------------------------------------------------------
FILE: ...tity_usage/web/modules/custom/entity_usage/src/EntityUsageBatchManager.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
   7 | ERROR | [x] Use statements should be sorted alphabetically. The first
     |       |     wrong one is Drupal\Core\Config\ConfigFactoryInterface.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  73 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1
     |       |     spaces
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
  74 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1
     |       |     spaces
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
  75 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1
     |       |     spaces
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
  76 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1
     |       |     spaces
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
  77 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1
     |       |     spaces
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
 111 | ERROR | [ ] The array declaration extends to column 141 (the limit is
     |       |     120). The array content should be split up over multiple
     |       |     lines (Drupal.Arrays.Array.LongLineDeclaration)
 111 | ERROR | [ ] The array declaration extends to column 140 (the limit is
     |       |     120). The array content should be split up over multiple
     |       |     lines (Drupal.Arrays.Array.LongLineDeclaration)
 151 | ERROR | [x] Expected 1 space before "==="; 2 found
     |       |     (Squiz.WhiteSpace.OperatorSpacing.SpacingBefore)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/project/entity_usage/web/modules/custom/entity_usage/src/EntityUsage.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
  10 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\entity_usage\Events\EntityUsageEvent.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 327 | WARNING | [x] '@todo: Fix bigint support once fixed in core. More info
     |         |     on #2680571 and' should match the format '@todo Fix
     |         |     problem X here.'
     |         |     (Drupal.Commenting.TodoComment.TodoFormat)
 327 | ERROR   | [x] There must be exactly one blank line before the tags in a
     |         |     doc comment
     |         |     (Drupal.Commenting.DocComment.SpacingBeforeTags)
 330 | ERROR   | [ ] Parameter tags must be defined first in a doc comment
     |         |     (Drupal.Commenting.DocComment.ParamNotFirst)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...usage/web/modules/custom/entity_usage/src/EntityUpdateManagerInterface.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 11 | WARNING | The class short comment should describe what the class does and
    |         | not simply repeat the class name
    |         | (Drupal.Commenting.ClassComment.Short)
--------------------------------------------------------------------------------
FILE: ...t/entity_usage/web/modules/custom/entity_usage/src/EntityUpdateManager.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
    |         | (Drupal.Commenting.ClassComment.Short)
--------------------------------------------------------------------------------
FILE: ...y_usage/src/Plugin/QueueWorker/EntityUsageRegenerateTrackingInfoWorker.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | WARNING | [x] Unused use statement
   |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...eb/modules/custom/entity_usage/src/Plugin/EntityUsage/Track/MediaEmbed.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 37 | WARNING | [x] '@TODO Re-evaluate if this is worth the effort and
    |         |     overhead.' should match the format '@todo Fix problem X
    |         |     here.' (Drupal.Commenting.TodoComment.TodoFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ge/web/modules/custom/entity_usage/src/Plugin/EntityUsage/Track/LinkIt.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 40 | WARNING | [x] '@TODO Re-evaluate if this is worth the effort and
    |         |     overhead.' should match the format '@todo Fix problem X
    |         |     here.' (Drupal.Commenting.TodoComment.TodoFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...modules/custom/entity_usage/src/Plugin/EntityUsage/Track/LayoutBuilder.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  16 | ERROR | [x] Use statements should be sorted alphabetically. The first
     |       |     wrong one is Drupal\Core\Path\PathValidatorInterface.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 188 | ERROR | [x] list(...) is forbidden, use [...] instead.
     |       |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
 230 | ERROR | [x] list(...) is forbidden, use [...] instead.
     |       |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...b/modules/custom/entity_usage/src/Plugin/EntityUsage/Track/EntityEmbed.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 39 | WARNING | [x] '@TODO Re-evaluate if this is worth the effort and
    |         |     overhead.' should match the format '@todo Fix problem X
    |         |     here.' (Drupal.Commenting.TodoComment.TodoFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...modules/custom/entity_usage/src/Plugin/EntityUsage/Track/CkeditorImage.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 40 | WARNING | [x] '@TODO Re-evaluate if this is worth the effort and
    |         |     overhead.' should match the format '@todo Fix problem X
    |         |     here.' (Drupal.Commenting.TodoComment.TodoFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...eb/modules/custom/entity_usage/src/Plugin/EntityUsage/Track/BlockField.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 37 | ERROR | [x] list(...) is forbidden, use [...] instead.
    |       |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...usage/web/modules/custom/entity_usage/src/Form/EntityUsageSettingsForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 227 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ] (Drupal.Arrays.Array.CommaLastItem)
 232 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ] (Drupal.Arrays.Array.CommaLastItem)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../entity_usage/web/modules/custom/entity_usage/src/Form/BatchUpdateForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Form\FormBase.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...age/web/modules/custom/entity_usage/src/Controller/ListUsageController.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
  14 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
  17 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\Core\Pager\PagerManagerInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  81 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 1
     |         |     spaces
     |         |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
 124 | ERROR   | [ ] The array declaration extends to column 147 (the limit is
     |         |     120). The array content should be split up over multiple
     |         |     lines (Drupal.Arrays.Array.LongLineDeclaration)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...usage/web/modules/custom/entity_usage/src/Commands/EntityUsageCommands.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\entity_usage\EntityUsageBatchManager.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../entity_usage/web/modules/custom/entity_usage/entity_usage.post_update.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
  5 | ERROR   | [x] Doc comment short description must start with a capital
    |         |     letter (Drupal.Commenting.DocComment.ShortNotCapital)
  9 | ERROR   | [x] Use statements should be sorted alphabetically. The first
    |         |     wrong one is Drupal\Core\Site\Settings.
    |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 10 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 13 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements
    |         |     hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
    |         |     hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "*
    |         |     Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or
    |         |     "* Implements hook_foo_BAR_ID_bar() for block templates."
    |         |     (Drupal.Commenting.HookComment.HookCommentFormat)
 14 | ERROR   | [ ] Doc comment short description must be on a single line,
    |         |     further text should be a separate paragraph
    |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/project/entity_usage/web/modules/custom/entity_usage/entity_usage.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 118 | ERROR   | [x] Closing parenthesis of array declaration must be on a new
     |         |     line (Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine)
 146 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ) (Drupal.Arrays.Array.CommaLastItem)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../project/entity_usage/web/modules/custom/entity_usage/entity_usage.install
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 260 | ERROR | [x] Expected one space after the comma, 0 found
     |       |     (Drupal.WhiteSpace.Comma.NoSpace)
 268 | ERROR | [x] Expected one space after the comma, 0 found
     |       |     (Drupal.WhiteSpace.Comma.NoSpace)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 1.03 secs; Memory: 10MB
šŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

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

Merge Requests

Comments & Activities

  • Issue created by @apaderno
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Failed
    10 months ago
    Total: 560s
    #165343
  • Status changed to Needs review 10 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Failed
    10 months ago
    Total: 496s
    #165420
  • Status changed to Needs work 7 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @avpaderno,

    I applied MR!82, it was not applied smoothly and fixed most of the phpcs issues.

    These are the remaining issues I encountered after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml.

    āžœ  entity_usage git:(8.x-2.0-beta13) curl https://git.drupalcode.org/project/entity_usage/-/merge_requests/82.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 28254    0 28254    0     0  53636      0 --:--:-- --:--:-- --:--:-- 53714
    patching file entity_usage.install
    patching file entity_usage.module
    patching file entity_usage.post_update.php
    Hunk #1 FAILED at 2.
    1 out of 1 hunk FAILED -- saving rejects to file entity_usage.post_update.php.rej
    patching file src/Commands/EntityUsageCommands.php
    patching file src/Controller/ListUsageController.php
    Hunk #1 succeeded at 12 (offset 1 line).
    Hunk #2 succeeded at 78 (offset 1 line).
    Hunk #3 succeeded at 121 (offset 1 line).
    patching file src/EntityUpdateManager.php
    patching file src/EntityUpdateManagerInterface.php
    patching file src/EntityUsage.php
    patching file src/EntityUsageBatchManager.php
    Hunk #1 FAILED at 2.
    Hunk #2 succeeded at 68 (offset 2 lines).
    Hunk #3 succeeded at 110 (offset 2 lines).
    Hunk #4 succeeded at 153 (offset 2 lines).
    1 out of 4 hunks FAILED -- saving rejects to file src/EntityUsageBatchManager.php.rej
    patching file src/EntityUsageTrackBase.php
    patching file src/Form/BatchUpdateForm.php
    patching file src/Form/EntityUsageSettingsForm.php
    Hunk #1 succeeded at 233 (offset 9 lines).
    patching file src/Plugin/EntityUsage/Track/BlockField.php
    patching file src/Plugin/EntityUsage/Track/CkeditorImage.php
    patching file src/Plugin/EntityUsage/Track/EntityEmbed.php
    patching file src/Plugin/EntityUsage/Track/LayoutBuilder.php
    patching file src/Plugin/EntityUsage/Track/LinkIt.php
    patching file src/Plugin/EntityUsage/Track/MediaEmbed.php
    patching file src/Plugin/QueueWorker/EntityUsageRegenerateTrackingInfoWorker.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] n
    Apply anyway? [n] n
    Skipping patch.
    1 out of 1 hunk ignored -- saving rejects to file src/Plugin/QueueWorker/EntityUsageRegenerateTrackingInfoWorker.php.rej
    patching file tests/modules/entity_usage_test/src/Plugin/Block/DependenciesBlock.php
    patching file tests/src/FunctionalJavascript/EmbeddedContentTest.php
    patching file tests/src/FunctionalJavascript/EntityUsageLayoutBuilderEntityBrowserBlockTest.php
    patching file tests/src/FunctionalJavascript/IntegrationTest.php
    patching file tests/src/Kernel/EntityUsageTest.php
    patching file tests/src/Kernel/EntityUsageTrackFileTest.php
    āžœ  entity_usage git:(8.x-2.0-beta13) āœ— ..
    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml entity_usage
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/tests/modules/entity_usage_test/config/install/field.storage.node.field_eu_test_related_nodes.yml
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     18 | ERROR | [x] Expected 1 newline at end of file; 0 found
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/tests/src/Kernel/EntityUsageTest.php
    --------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------------------
       6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityInterface.
     116 | WARNING | [ ] Unused variable $source_vid.
     182 | WARNING | [ ] Unused variable $storage.
    --------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/tests/src/Kernel/EntityUsageTrackFileTest.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\entity_test\Entity\EntityTest.
    -------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/entity_usage.module
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------
     119 | WARNING | [x] A comma should follow the last multiline array item. Found: )
     120 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
    -----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/entity_usage.post_update.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      5 | ERROR   | [x] Doc comment short description must start with a capital letter
     10 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Site\Settings.
     13 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
        |         |     "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
     14 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/src/EntityUsageInterface.php
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 3 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     163 | WARNING | Line exceeds 80 characters; contains 90 characters
     197 | ERROR   | The text '@deprecated in branch 2.x. Use \Drupal\entity_usage\EntityUsageInterface::listSources() instead.' does not match the standard format: @deprecated in
         |         | %deprecation-version% and is removed from %removal-version%. %extra-info%.
     197 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
     219 | ERROR   | The text '@deprecated in branch 2.x. Use \Drupal\entity_usage\EntityUsageInterface::listTargets() instead.' does not match the standard format: @deprecated in
         |         | %deprecation-version% and is removed from %removal-version%. %extra-info%.
     219 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/src/Plugin/EntityUsage/Track/BlockField.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     37 | WARNING | Unused variable $display_id.
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/src/EntityUsageBatchManager.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     115 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
    -----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/entity_usage/src/Commands/EntityUsageCommands.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
     82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 2.93 secs; Memory: 16MB
    
    āžœ  contrib

    Please check and advise.
    Thank you.

  • Assigned to kulpratap2002
  • šŸ‡®šŸ‡³India arunsahijpal

    Working on it!

  • Pipeline finished with Failed
    3 months ago
    Total: 177s
    #353060
  • Pipeline finished with Failed
    3 months ago
    Total: 350s
    #354123
  • Pipeline finished with Success
    3 months ago
    Total: 199s
    #356073
  • šŸ‡®šŸ‡³India arunsahijpal

    Hi @cleavinjosh and @marcoscano,
    I've removed all the phpcs errors , please check it once.

  • šŸ‡®šŸ‡³India chandansha

    I have tested MR 82 using @cleavinjosh given command there is still some of issue pending.
    I move it to Need Work.
    ThankS!!

  • šŸ‡®šŸ‡³India chandansha

    @arunsahijpal sorry I have tested it on my local phpcs. In Pipeline are run successfully passed.
    I move it to RTBC
    Thanks!!

  • šŸ‡¬šŸ‡§United Kingdom alexpott šŸ‡ŖšŸ‡ŗšŸŒ

    We should add

    phpcs:
      allow_failure: false
    

    to the .gitlab-ci.yml file and then we'll fail a build when a change causes PHPCS to fail.

  • Pipeline finished with Failed
    3 months ago
    Total: 359s
    #358032
  • Pipeline finished with Success
    3 months ago
    Total: 667s
    #358039
  • šŸ‡®šŸ‡³India arunsahijpal

    Hi @alexpott,
    I've allowed phpcs failure and the phpcs is also passing the pipeline, kindly check.

  • šŸ‡¬šŸ‡§United Kingdom alexpott šŸ‡ŖšŸ‡ŗšŸŒ

    Looks great

  • šŸ‡ŖšŸ‡øSpain marcoscano Barcelona, Spain

    Thanks for helping! This is ready to go but needs a re-roll

  • First commit to issue fork.
  • šŸ‡®šŸ‡³India akulsaxena

    Rebased

  • Pipeline finished with Success
    3 months ago
    Total: 409s
    #359857
  • šŸ‡¬šŸ‡§United Kingdom alexpott šŸ‡ŖšŸ‡ŗšŸŒ

    Looking good again.

  • Pipeline finished with Skipped
    3 months ago
    #360607
  • šŸ‡ŖšŸ‡øSpain marcoscano Barcelona, Spain

    Committed. Thanks all!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024