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

FILE: .../custom/entity_usage-3445394/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: ...b/modules/custom/entity_usage-3445394/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: ...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: ...ntity_usage-3445394/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: ...394/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: ...45394/web/modules/custom/entity_usage-3445394/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: ...b/modules/custom/entity_usage-3445394/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: ...45394/web/modules/custom/entity_usage-3445394/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: ...94/web/modules/custom/entity_usage-3445394/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: ..._usage-3445394/web/modules/custom/entity_usage-3445394/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: ...b/modules/custom/entity_usage-3445394/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: ...445394/web/modules/custom/entity_usage-3445394/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: ...3445394/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: ...es/custom/entity_usage-3445394/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: ...odules/custom/entity_usage-3445394/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: ...custom/entity_usage-3445394/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: ...s/custom/entity_usage-3445394/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: ...custom/entity_usage-3445394/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: ...es/custom/entity_usage-3445394/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: ...b/modules/custom/entity_usage-3445394/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: ...45394/web/modules/custom/entity_usage-3445394/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: ...modules/custom/entity_usage-3445394/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: ...b/modules/custom/entity_usage-3445394/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: ...45394/web/modules/custom/entity_usage-3445394/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: ..._usage-3445394/web/modules/custom/entity_usage-3445394/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: ...usage-3445394/web/modules/custom/entity_usage-3445394/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.11 secs; Memory: 10MB
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

apaderno created an issue. See original summary.

avpaderno’s picture

Priority: Normal » Minor
Issue summary: View changes
avpaderno’s picture

Status: Active » Needs review
cleavinjosh’s picture

Status: Needs review » Needs work

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.

kul.pratap’s picture

Assigned: Unassigned » kul.pratap
kul.pratap’s picture

Assigned: kul.pratap » Unassigned
arunsahijpal’s picture

Assigned: Unassigned » arunsahijpal

Working on it!

arunsahijpal’s picture

Assigned: arunsahijpal » Unassigned
Status: Needs work » Needs review

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

chandansha’s picture

Status: Needs review » Needs work

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

chandansha’s picture

Status: Needs work » Reviewed & tested by the community

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

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

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.

arunsahijpal’s picture

Status: Needs work » Needs review

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

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

Looks great

marcoscano’s picture

Status: Reviewed & tested by the community » Needs work

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

Anonymous’s picture

akulsaxena made their first commit to this issue’s fork.

Anonymous’s picture

Assigned: Unassigned »

@marcoscano
Re-rolled as requested
Please have a look

Anonymous’s picture

Assigned: » Unassigned
Anonymous’s picture

Status: Needs work » Needs review
alexpott’s picture

Status: Needs review » Reviewed & tested by the community

Looking good again.

marcoscano’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks all!

Status: Fixed » Closed (fixed)

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