Command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig modules/contrib/diff/ --report-full --report-summary

Result:

FILE: diff.links.menu.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/modules/diff_test/diff_test.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldDefinitionInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/modules/diff_test/src/Plugin/diff/Field/TestLighterTextPlugin.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/modules/diff_test/src/Plugin/diff/Field/TestHeavierTextPlugin.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/DiffPluginEntityTest.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------
 55 | ERROR   | [x] Short array syntax must be used to define arrays
 75 | ERROR   | [x] Short array syntax must be used to define arrays
 82 | ERROR   | [x] Short array syntax must be used to define arrays
 89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/DiffPluginFileTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
  56 | ERROR   | [x] Short array syntax must be used to define arrays
  94 | WARNING | [ ] Unused variable $revision2.
 184 | WARNING | [ ] Unused variable $revision2.
 201 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 227 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 272 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/NodeAccessTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 71 | ERROR | [x] Concat operator must be surrounded by a single space
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: tests/src/Functional/CoreVersionUiTestTrait.php
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
 39 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------


FILE: tests/src/Functional/DiffPluginVariousTest.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 10 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
  72 | ERROR   | [x] Short array syntax must be used to define arrays
  81 | ERROR   | [x] Short array syntax must be used to define arrays
  88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 133 | ERROR   | [x] Short array syntax must be used to define arrays
 137 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 140 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 223 | ERROR   | [x] Short array syntax must be used to define arrays
 262 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 265 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 323 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 326 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 357 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 360 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 402 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/DiffRevisionTest.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 15 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------
  42 | ERROR   | [x] Short array syntax must be used to define arrays
  52 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  58 | ERROR   | [x] Short array syntax must be used to define arrays
  69 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  73 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  93 | WARNING | [ ] Unused variable $head.
 176 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 178 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 208 | ERROR   | [x] Expected one space after the comma, 0 found
 210 | ERROR   | [x] Expected one space after the comma, 0 found
 235 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 361 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 371 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 374 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 388 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 393 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 451 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 463 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 482 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/DiffViewModeTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 35 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Functional/DiffPluginTest.php
------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------
  77 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 147 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------


FILE: tests/src/FunctionalJavascript/DiffLocaleTest.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
 35 | ERROR   | [x] Short array syntax must be used to define arrays
 43 | ERROR   | [x] Short array syntax must be used to define arrays
 68 | ERROR   | [x] Short array syntax must be used to define arrays
 76 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 83 | WARNING | [ ] Unused variable $french_node.
 86 | ERROR   | [x] Short array syntax must be used to define arrays
 91 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: css/diff.double-column.css
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 49 | ERROR | [x] CSS colours must be defined in lowercase; expected #aaa but found #AAA
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: css/diff.single-column.css
-----------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------
 49 | ERROR | [x] CSS colours must be defined in lowercase; expected #aaa but found #AAA
 51 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: src/FieldDiffBuilderBase.php
-----------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------
  10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface.
  77 | ERROR | [x] Short array syntax must be used to define arrays
  83 | ERROR | [x] Short array syntax must be used to define arrays
  87 | ERROR | [x] Short array syntax must be used to define arrays
 117 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: src/Controller/PluginRevisionController.php
------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\DependencyInjection\ContainerInterface.
 111 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 198 | ERROR   | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: src/Controller/NodeRevisionController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 39 | WARNING | Line exceeds 80 characters; contains 92 characters
----------------------------------------------------------------------


FILE: src/DiffBuilderManager.php
-------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------
 173 | ERROR | [x] Data types in @param tags need to be fully namespaced
 203 | ERROR | [x] Data types in @param tags need to be fully namespaced
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------


FILE: src/Routing/RouteSubscriber.php
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 22 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Annotation/FieldDiffBuilder.php
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 51 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Form/FieldsSettingsForm.php
--------------------------------------------------------------------------------
FOUND 30 ERRORS AND 4 WARNINGS AFFECTING 31 LINES
--------------------------------------------------------------------------------
  12 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\ConfigFormBase.
 110 | ERROR   | [x] Short array syntax must be used to define arrays
 117 | ERROR   | [x] Short array syntax must be used to define arrays
 118 | ERROR   | [x] Short array syntax must be used to define arrays
 146 | ERROR   | [x] Short array syntax must be used to define arrays
 147 | ERROR   | [x] Short array syntax must be used to define arrays
 165 | ERROR   | [x] Data types in @param tags need to be fully namespaced
 165 | ERROR   | [x] Data types in @param tags need to be fully namespaced
 230 | ERROR   | [x] Short array syntax must be used to define arrays
 231 | ERROR   | [x] Short array syntax must be used to define arrays
 237 | ERROR   | [x] Short array syntax must be used to define arrays
 238 | ERROR   | [x] Short array syntax must be used to define arrays
 241 | ERROR   | [x] Short array syntax must be used to define arrays
 249 | ERROR   | [x] Short array syntax must be used to define arrays
 258 | ERROR   | [x] Short array syntax must be used to define arrays
 260 | ERROR   | [x] Short array syntax must be used to define arrays
 260 | ERROR   | [x] Short array syntax must be used to define arrays
 262 | ERROR   | [x] Short array syntax must be used to define arrays
 263 | ERROR   | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
 265 | ERROR   | [x] Short array syntax must be used to define arrays
 266 | ERROR   | [x] Short array syntax must be used to define arrays
 286 | ERROR   | [x] Short array syntax must be used to define arrays
 293 | ERROR   | [x] Short array syntax must be used to define arrays
 370 | ERROR   | [x] Short array syntax must be used to define arrays
 376 | ERROR   | [x] Short array syntax must be used to define arrays
 383 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 384 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 403 | ERROR   | [x] Short array syntax must be used to define arrays
 405 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 464 | WARNING | [x] There must be no blank line following an inline comment
 464 | WARNING | [ ] There must be no blank line following an inline comment
 467 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 506 | ERROR   | [x] Short array syntax must be used to define arrays
 520 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: src/Form/RevisionOverviewForm.php
----------------------------------------------------------------------
FOUND 24 ERRORS AND 1 WARNING AFFECTING 23 LINES
----------------------------------------------------------------------
  13 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormBase.
 154 | ERROR   | [x] No space found before comment text; expected "// appear." but found "//appear."
 167 | ERROR   | [x] Short array syntax must be used to define arrays
 177 | ERROR   | [x] Short array syntax must be used to define arrays
 194 | ERROR   | [x] Short array syntax must be used to define arrays
 197 | ERROR   | [x] Short array syntax must be used to define arrays
 197 | ERROR   | [x] Short array syntax must be used to define arrays
 213 | ERROR   | [x] Short array syntax must be used to define arrays
 220 | ERROR   | [ ] The array declaration extends to column 137 (the limit is 120). The array content should be split up over multiple lines
 238 | ERROR   | [x] Short array syntax must be used to define arrays
 242 | ERROR   | [x] Short array syntax must be used to define arrays
 243 | ERROR   | [x] Short array syntax must be used to define arrays
 251 | ERROR   | [x] Short array syntax must be used to define arrays
 256 | ERROR   | [x] Short array syntax must be used to define arrays
 261 | ERROR   | [x] Array indentation error, expected 16 spaces but found 18
 261 | ERROR   | [ ] The array declaration extends to column 150 (the limit is 120). The array content should be split up over multiple lines
 262 | ERROR   | [x] Array indentation error, expected 16 spaces but found 18
 266 | ERROR   | [x] Short array syntax must be used to define arrays
 278 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 294 | ERROR   | [x] Short array syntax must be used to define arrays
 297 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 298 | ERROR   | [x] Short array syntax must be used to define arrays
 299 | ERROR   | [x] Short array syntax must be used to define arrays
 305 | ERROR   | [x] Short array syntax must be used to define arrays
 404 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: src/Form/GeneralSettingsForm.php
----------------------------------------------------------------------
FOUND 7 ERRORS AND 6 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------
  70 | ERROR   | [x] Short array syntax must be used to define arrays
  74 | ERROR   | [x] Short array syntax must be used to define arrays
  91 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
  98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  99 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 129 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 155 | ERROR   | [x] Short array syntax must be used to define arrays
 157 | ERROR   | [x] Short array syntax must be used to define arrays
 164 | ERROR   | [x] Short array syntax must be used to define arrays
 220 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 230 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: src/Plugin/views/field/DiffFrom.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
 25 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 71 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: src/Plugin/views/field/DiffTo.php
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------
 18 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------


FILE: src/Plugin/diff/Field/ListFieldBuilder.php
-----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
 28 | ERROR | [x] Short array syntax must be used to define arrays
 61 | ERROR | [x] Short array syntax must be used to define arrays
 64 | ERROR | [x] Short array syntax must be used to define arrays
 88 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: src/Plugin/diff/Field/TextWithSummaryFieldBuilder.php
------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
  26 | ERROR | [x] Short array syntax must be used to define arrays
  41 | ERROR | [x] Short array syntax must be used to define arrays
  82 | ERROR | [x] Short array syntax must be used to define arrays
  88 | ERROR | [x] Short array syntax must be used to define arrays
 112 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Plugin/diff/Field/ImageFieldBuilder.php
------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
  26 | ERROR | [x] Short array syntax must be used to define arrays
  80 | ERROR | [x] Short array syntax must be used to define arrays
  99 | ERROR | [x] Short array syntax must be used to define arrays
 104 | ERROR | [x] Short array syntax must be used to define arrays
 110 | ERROR | [x] Short array syntax must be used to define arrays
 116 | ERROR | [x] Short array syntax must be used to define arrays
 121 | ERROR | [x] Short array syntax must be used to define arrays
 155 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Plugin/diff/Field/EntityReferenceFieldBuilder.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
  6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
  9 | WARNING | [ ] Global constants should not be used, move it to a class or interface
 10 | WARNING | [ ] Global constants should not be used, move it to a class or interface
 30 | ERROR   | [x] Short array syntax must be used to define arrays
 58 | ERROR   | [x] Short array syntax must be used to define arrays
 61 | ERROR   | [x] Short array syntax must be used to define arrays
 61 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 61 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 81 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: src/Plugin/diff/Field/CommentFieldBuilder.php
-----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
 27 | ERROR | [x] Short array syntax must be used to define arrays
 67 | ERROR | [x] Short array syntax must be used to define arrays
 72 | ERROR | [x] Short array syntax must be used to define arrays
 95 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: src/Plugin/diff/Field/LinkFieldBuilder.php
-----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
 26 | ERROR | [x] Short array syntax must be used to define arrays
 54 | ERROR | [x] Short array syntax must be used to define arrays
 59 | ERROR | [x] Short array syntax must be used to define arrays
 82 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: src/Plugin/diff/Field/TextFieldBuilder.php
-----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
 28 | ERROR | [x] Short array syntax must be used to define arrays
 43 | ERROR | [x] Short array syntax must be used to define arrays
 72 | ERROR | [x] Short array syntax must be used to define arrays
 95 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: src/Plugin/diff/Field/FileFieldBuilder.php
------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
  26 | ERROR | [x] Short array syntax must be used to define arrays
  89 | ERROR | [x] Short array syntax must be used to define arrays
  94 | ERROR | [x] Short array syntax must be used to define arrays
 100 | ERROR | [x] Short array syntax must be used to define arrays
 106 | ERROR | [x] Short array syntax must be used to define arrays
 111 | ERROR | [x] Short array syntax must be used to define arrays
 138 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Plugin/diff/Field/CoreFieldBuilder.php
-------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 10 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
 43 | ERROR   | [ ] Doc comment for parameter $config does not match actual variable name $renderer
 75 | ERROR   | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------


FILE: src/Plugin/diff/Layout/VisualInlineDiffLayout.php
------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------
  8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityInterface.
 17 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: src/Plugin/diff/Layout/UnifiedFieldsDiffLayout.php
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 176 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 177 | ERROR | [ ] The array declaration extends to column 148 (the limit is 120). The array content should be split up over multiple lines
 177 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 199 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 200 | ERROR | [ ] The array declaration extends to column 150 (the limit is 120). The array content should be split up over multiple lines
 200 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: src/Plugin/diff/Layout/SplitFieldsDiffLayout.php
-----------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-----------------------------------------------------------------------------
 190 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 192 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 197 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 208 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 210 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 215 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: src/DiffLayoutBase.php
---------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------
  12 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
  19 | WARNING | [x] Unused use statement
 251 | WARNING | [ ] Variable $options inside unset call is undefined.
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: src/FieldDiffBuilderInterface.php
-------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------
 25 | ERROR | [ ] Long array syntax must not be used in doc comment code annotations
 33 | ERROR | [x] Data types in @param tags need to be fully namespaced
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------


FILE: src/DiffEntityParser.php
--------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------
 63 | ERROR   | [x] Short array syntax must be used to define arrays
 64 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 86 | WARNING | [ ] Unused variable $entity_key.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: src/DiffFormatter.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.
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: src/DiffEntityComparison.php
--------------------------------------------------------------------------------
FOUND 11 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Plugin\PluginManagerInterface.
 102 | ERROR   | [x] Short array syntax must be used to define arrays
 108 | ERROR   | [x] list(...) is forbidden, use [...] instead.
 132 | ERROR   | [x] list(...) is forbidden, use [...] instead.
 157 | ERROR   | [x] Short array syntax must be used to define arrays
 158 | ERROR   | [x] Short array syntax must be used to define arrays
 159 | ERROR   | [x] Short array syntax must be used to define arrays
 161 | ERROR   | [x] Short array syntax must be used to define arrays
 213 | ERROR   | [x] Short array syntax must be used to define arrays
 214 | ERROR   | [x] Short array syntax must be used to define arrays
 215 | ERROR   | [x] Short array syntax must be used to define arrays
 278 | WARNING | [x] There must be no blank line following an inline comment
 278 | WARNING | [ ] There must be no blank line following an inline comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 3.05 secs; Memory: 10MB


PHP CODE SNIFFER REPORT SUMMARY
-----------------------------------------------------------------------
FILE                                                                                                           ERRORS  WARNINGS
-----------------------------------------------------------------------
diff.links.menu.yml                                                         1       0
css/diff.double-column.css                                                  1       0
css/diff.single-column.css                                                  2       0
src/DiffBuilderManager.php                                                  2       0
src/DiffEntityComparison.php                                                11      2
src/DiffEntityParser.php                                                    1       2
src/DiffFormatter.php                                                       1       0
src/DiffLayoutBase.php                                                      1       2
src/FieldDiffBuilderBase.php                                                5       0
src/FieldDiffBuilderInterface.php                                           2       0
src/Annotation/FieldDiffBuilder.php                                         1       0
src/Controller/NodeRevisionController.php                                   0       1
src/Controller/PluginRevisionController.php                                 2       1
src/Form/FieldsSettingsForm.php                                             30      4
src/Form/GeneralSettingsForm.php                                            7       6
src/Form/RevisionOverviewForm.php                                           24      1
src/Plugin/diff/Field/CommentFieldBuilder.php                               5       0
src/Plugin/diff/Field/CoreFieldBuilder.php                                  3       1
src/Plugin/diff/Field/EntityReferenceFieldBuilder.php                       5       4
src/Plugin/diff/Field/FileFieldBuilder.php                                  8       0
src/Plugin/diff/Field/ImageFieldBuilder.php                                 9       0
src/Plugin/diff/Field/LinkFieldBuilder.php                                  5       0
src/Plugin/diff/Field/ListFieldBuilder.php                                  5       0
src/Plugin/diff/Field/TextFieldBuilder.php                                  5       0
src/Plugin/diff/Field/TextWithSummaryFieldBuilder.php                       6       0
src/Plugin/diff/Layout/SplitFieldsDiffLayout.php                            6       0
src/Plugin/diff/Layout/UnifiedFieldsDiffLayout.php                          6       0
src/Plugin/diff/Layout/VisualInlineDiffLayout.php                           2       0
src/Plugin/views/field/DiffFrom.php                                         1       1
src/Plugin/views/field/DiffTo.php                                           0       1
src/Routing/RouteSubscriber.php                                             1       0
tests/modules/diff_test/diff_test.module                                    1       0
tests/modules/diff_test/src/Plugin/diff/Field/TestHeavierTextPlugin.php     1       0
tests/modules/diff_test/src/Plugin/diff/Field/TestLighterTextPlugin.php     1       0
tests/src/Functional/CoreVersionUiTestTrait.php                             1       0
tests/src/Functional/DiffPluginEntityTest.php                               3       1
tests/src/Functional/DiffPluginFileTest.php                                 2       4
tests/src/Functional/DiffPluginTest.php                                     0       2
tests/src/Functional/DiffPluginVariousTest.php                              4       10
tests/src/Functional/DiffRevisionTest.php                                   4       15
tests/src/Functional/DiffViewModeTest.php                                   1       0
tests/src/Functional/NodeAccessTest.php                                     1       0
tests/src/FunctionalJavascript/DiffLocaleTest.php                           5       2
-----------------------------------------------------------------------
A TOTAL OF 182 ERRORS AND 60 WARNINGS WERE FOUND IN 43 FILES
-----------------------------------------------------------------------
PHPCBF CAN FIX 179 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


Issue fork diff-3013942

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

deepanker_bhalla created an issue. See original summary.

deepanker_bhalla’s picture

Status: Active » Needs review
StatusFileSize
new58.76 KB

Fixed the reported issues. Kindly review.

Status: Needs review » Needs work

The last submitted patch, 2: 3013942-coding-standard-2.patch, failed testing. View results

suresh prabhu parkala’s picture

Status: Needs work » Needs review
StatusFileSize
new55.12 KB

Please review.

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

dipesh_goswami’s picture

Assigned: Unassigned » dipesh_goswami

Hi @Suresh Prabhu Parkala,
I am reviewing your patch.
Thanks.

dipesh_goswami’s picture

Assigned: dipesh_goswami » Unassigned

Hi,
Your patch failed for me.

error: patch failed: tests/src/Functional/CoreVersionUiTestTrait.php:36
error: tests/src/Functional/CoreVersionUiTestTrait.php: patch does not apply
LeoAlcci’s picture

Assigned: Unassigned » LeoAlcci

I'll work on it

LeoAlcci’s picture

StatusFileSize
new86.57 KB

I fixed almost all the phpcs issues, please kindly review it!

phpcs issues left:
FILE: diff/src/DiffLayoutBase.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
250 | WARNING | Variable $options inside unset call is undefined.
----------------------------------------------------------------------------------------------------------------

FILE: diff/src/Plugin/diff/Field/EntityReferenceFieldBuilder.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------
9 | WARNING | Global constants should not be used, move it to a class or interface
10 | WARNING | Global constants should not be used, move it to a class or interface
----------------------------------------------------------------------------------------------------------------------------------------

FILE: .diff/src/Plugin/diff/Layout/VisualInlineDiffLayout.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------

LeoAlcci’s picture

Assigned: LeoAlcci » Unassigned
viniciuscosta’s picture

Assigned: Unassigned » viniciuscosta

I'll review it

viniciuscosta’s picture

Assigned: viniciuscosta » Unassigned
StatusFileSize
new87.85 KB

Phpcs issues left:

FILE: .diff/src/Plugin/diff/Layout/VisualInlineDiffLayout.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

The last submitted patch, 9: 3013942-9.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 12: 3013942-12.patch, failed testing. View results

Webbeh’s picture

As a friendly reminder, please post diffs between each patch file, or just use the fork/MR function, so that folks can track changes patch-to-patch.

Arturo-q’s picture

Assigned: Unassigned » Arturo-q

Hi, I will be working on it

Arturo-q’s picture

Assigned: Arturo-q » Unassigned
Status: Needs work » Needs review
StatusFileSize
new89.94 KB
new3.26 KB

Hey, Here is the patch, I fixed the errors related to tests and also the last CS error.
Moving to needs review. =)

erikaagp’s picture

Status: Needs review » Reviewed & tested by the community

It works for me. Good job!

zniki.ru made their first commit to this issue’s fork.

nikolay shapovalov’s picture

Title: Coding standard » Fix phpcs violations
Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
Issue tags: +Coding standards

Converted this issue to MR, using patch #17.
MR is ready for review, not sure if css files needs to be fixed in this issue.

nikolay shapovalov’s picture

silvi.addweb’s picture

StatusFileSize
new19.16 KB

Attached patch to resolve phpcs issues.

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I reviewed patch 23, applied against Diff 8.x-1.x-dev, and confirmed it fixes the issues reported by phpcs.

jetherparadero@PrometSources-MacBook-Pro-3 diff % curl https://www.drupal.org/files/issues/2024-04-29/3013942-coding-standard-23.patch | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19618  100 19618    0     0  55959      0 --:--:-- --:--:-- --:--:-- 57029
patching file README.md
patching file 'css/diff.double-column.css'
patching file 'css/diff.single-column.css'
patching file diff.links.menu.yml
patching file diff.module
patching file diff.services.yml
patching file 'src/DiffEntityParser.php'
patching file 'src/DiffLayoutBase.php'
patching file 'src/Form/GeneralSettingsForm.php'
patching file 'src/Form/RevisionOverviewForm.php'
patching file 'src/Plugin/diff/Field/EntityReferenceFieldBuilder.php'
patching file 'src/Plugin/views/field/DiffFrom.php'
patching file 'src/Plugin/views/field/DiffTo.php'
patching file 'tests/modules/diff_test/diff_test.module'
patching file 'tests/src/Functional/DiffPluginEntityTest.php'
patching file 'tests/src/Functional/DiffPluginTest.php'
patching file 'tests/src/Functional/DiffRevisionTest.php'
jetherparadero@PrometSources-MacBook-Pro-3 diff % cd ..
jetherparadero@PrometSources-MacBook-Pro-3 contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig diff
jetherparadero@PrometSources-MacBook-Pro-3 contrib %

Thank you.

acbramley’s picture

Status: Reviewed & tested by the community » Needs work

Please update to use an MR.

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

I will provide the MR.

atul_ghate’s picture

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

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

acbramley’s picture

Status: Needs review » Needs work

There are no PHPCS failures on HEAD https://git.drupalcode.org/project/diff/-/pipelines/176683

These changes are causing many failures in the MR.

The only things failing in gitlab CI are eslint and stylelint now.

acbramley’s picture

Status: Needs work » Closed (outdated)