Fix the issues reported by phpcs

Created on 22 August 2022, about 2 years ago
Updated 14 August 2024, 3 months ago

Command

phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme modules/custom/entity_embed/ -s

Result


FILE: tests/modules/entity_embed_test/src/Controller/TestEntityEmbedController.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 13 | WARNING | Line exceeds 80 characters; contains 81 characters (Drupal.Files.LineLength.TooLong)
------------------------------------------------------------------------------------------------------------


FILE: tests/src/Functional/EntityEmbedTestBase.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 109 | ERROR | The array declaration extends to column 121 (the limit is 120). The array content should be
     |       | split up over multiple lines (Drupal.Arrays.Array.LongLineDeclaration)
------------------------------------------------------------------------------------------------------------


FILE: tests/src/Functional/EntityEmbedEntityBrowserTest.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Drupal\embed\Entity\EmbedButton.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: tests/src/Functional/ViewModeFieldFormatterTest.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 14 | ERROR | Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
---------------------------------------------------------------------------------------------------


FILE: tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 56 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
    |         |     (Drupal.Arrays.Array.CommaLastItem)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: tests/src/Kernel/EntityEmbedFilterTestBase.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 74 | WARNING | Unused variable $admin_user.
    |         | (DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable)
-----------------------------------------------------------------------------------------------------------


FILE: tests/src/Kernel/EntityEmbedFilterTest.php
-------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
 59 | ERROR | [x] Missing function doc comment
    |       |     (Drupal.Commenting.FunctionComment.Missing)
 65 | ERROR | [x] Missing function doc comment
    |       |     (Drupal.Commenting.FunctionComment.Missing)
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------


FILE: tests/src/FunctionalJavascript/SortableTestTrait.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 121 | ERROR | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing)
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: tests/src/FunctionalJavascript/ConfigurationUiTest.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 211 | ERROR | Doc comment short description must be on a single line, further text should be a separate
     |       | paragraph (Drupal.Commenting.DocComment.ShortSingleLine)
------------------------------------------------------------------------------------------------------------


FILE: tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Drupal\editor\Entity\Editor.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------
  52 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     |         |     (Drupal.Files.LineLength.TooLong)
 275 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     |         |     (Drupal.Files.LineLength.TooLong)
 276 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     |         |     (Drupal.Files.LineLength.TooLong)
 557 | ERROR   | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing)
 757 | WARNING | [ ] Unused variable $page.
     |         |     (DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable)
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: entity_embed.install
------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
  9 | ERROR | [x] Doc comment star missing (Drupal.Commenting.DocCommentStar.StarMissing)
  9 | ERROR | [ ] Doc comment short description must start with a capital letter
    |       |     (Drupal.Commenting.DocComment.ShortNotCapital)
 10 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
    |       |     (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: entity_embed.module
------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 5 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------
  10 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\Core\Form\FormStateInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  11 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  12 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  13 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  14 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  15 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  74 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found
     |         |     "file_entity_embed_display_plugins_alter" but expected
     |         |     "entity_embed_file_entity_embed_display_plugins_alter"
     |         |     (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix)
  84 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found
     |         |     "taxonomy_entity_embed_display_plugins_alter" but expected
     |         |     "entity_embed_taxonomy_entity_embed_display_plugins_alter"
     |         |     (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix)
 299 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 331 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
     |         |     closing parentheses (Drupal.Commenting.InlineComment.InvalidEndChar)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/Controller/EditEmbeddedEntity.php
------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
  7 | ERROR   | [x] Missing class doc comment (Drupal.Commenting.ClassComment.Missing)
 21 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    |         |     (DrupalPractice.Objects.GlobalDrupal.GlobalDrupal)
 23 | ERROR   | [x] Expected 1 blank line after function; 3 found
    |         |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 26 | ERROR   | [ ] More than 2 empty lines are not allowed (Drupal.WhiteSpace.EmptyLines.EmptyLines)
 27 | ERROR   | [x] The closing brace for the class must have an empty line before it
    |         |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------
   6 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
   8 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  10 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  13 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
 127 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
 227 | ERROR   | [ ] Description for the @return value is missing
     |         |     (Drupal.Commenting.FunctionComment.MissingReturnComment)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/EntityEmbedDisplay/EntityEmbedDisplayInterface.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Drupal\Component\Plugin\ConfigurableInterface.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/EntityEmbedDisplay/EntityEmbedDisplayManager.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Drupal\Component\Plugin\Exception\PluginException.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/Form/EntityEmbedDialog.php
------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------
  26 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
     |       |     Drupal\Component\Serialization\Json.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  98 | ERROR | [ ] Parameter $file_url_generator is not described in comment
     |       |     (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
 113 | ERROR | [ ] Missing parameter name (Drupal.Commenting.FunctionComment.MissingParamName)
 196 | ERROR | [x] Use null coalesce operator instead of ternary operator.
     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 203 | ERROR | [x] Use null coalesce operator instead of ternary operator.
     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 430 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
     |       |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 526 | ERROR | [x] Use null coalesce operator instead of ternary operator.
     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 614 | ERROR | [ ] The array declaration extends to column 126 (the limit is 120). The array content should
     |       |     be split up over multiple lines (Drupal.Arrays.Array.LongLineDeclaration)
 621 | ERROR | [ ] The array declaration extends to column 156 (the limit is 120). The array content should
     |       |     be split up over multiple lines (Drupal.Arrays.Array.LongLineDeclaration)
 641 | ERROR | [ ] The array declaration extends to column 122 (the limit is 120). The array content should
     |       |     be split up over multiple lines (Drupal.Arrays.Array.LongLineDeclaration)
 892 | ERROR | [ ] Public method name "EntityEmbedDialog::registerJSCallback" is not in lowerCamel
     |       |     format (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/Plugin/Derivative/FieldFormatterDeriver.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Drupal\Core\Field\FormatterPluginManager.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/Plugin/CKEditorPlugin/DrupalEntity.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
 42 | WARNING | t() calls should be avoided in classes, use
    |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    |         | (DrupalPractice.Objects.GlobalFunction.GlobalFunction)
 43 | WARNING | t() calls should be avoided in classes, use
    |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    |         | (DrupalPractice.Objects.GlobalFunction.GlobalFunction)
------------------------------------------------------------------------------------------------------------


FILE: src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
  74 | ERROR | Public method name "EntityEmbed::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in
     |       | lowerCamel format (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
  93 | ERROR | Public method name "EntityEmbed::mapCKEditor4SettingsToCKEditor5Configuration" is not in
     |       | lowerCamel format (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
 100 | ERROR | Public method name "EntityEmbed::computeCKEditor5PluginSubsetConfiguration" is not in
     |       | lowerCamel format (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
------------------------------------------------------------------------------------------------------------


FILE: src/Plugin/CKEditor5Plugin/DrupalEntity.php
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------
 16 | ERROR   | Missing short description in doc comment
    |         | (Drupal.Commenting.DocComment.MissingShort)
 29 | WARNING | Line exceeds 80 characters; contains 154 characters
    |         | (Drupal.Files.LineLength.TooLong)
------------------------------------------------------------------------------------------------------


FILE: src/Plugin/CKEditor5Plugin/DrupalEntityDeriver.php
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
 15 | ERROR | [x] Missing class doc comment (Drupal.Commenting.ClassComment.Missing)
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: EntityEmbedDisplay/ImageFieldFormatter.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 7 WARNINGS AFFECTING 8 LINES
------------------------------------------------------------------------------------------------------------
   6 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
   7 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
   9 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  10 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  11 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  13 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  96 | ERROR   | [x] list(...) is forbidden, use [...] instead.
     |         |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
 165 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     |         |     (DrupalPractice.Objects.GlobalFunction.GlobalFunction)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: EntityEmbedDisplay/EntityReferenceFieldFormatter.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
  6 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  8 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
  9 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
 10 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
 12 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: EntityEmbedDisplay/MediaImageDecorator.php
------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
 121 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 122 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 147 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     |         |     (DrupalPractice.Objects.GlobalFunction.GlobalFunction)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/Plugin/Filter/EntityEmbedFilter.php
------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
  19 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
     |       |     Drupal\embed\DomHelperTrait.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  90 | ERROR | [ ] Parameter $file_url_generator is not described in comment
     |       |     (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
 107 | ERROR | [ ] Missing parameter name (Drupal.Commenting.FunctionComment.MissingParamName)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: src/EntityEmbedBuilder.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    |         | (DrupalPractice.Objects.GlobalDrupal.GlobalDrupal)
------------------------------------------------------------------------------------------------------------


FILE: entity_embed.api.php
------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment (Drupal.Commenting.FileComment.Missing)
  5 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
    |         |     Drupal\Core\Entity\EntityInterface.
    |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  5 | ERROR   | [x] There must be one blank line after the last USE statement; 0 found;
    |         |     (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse)
 71 | WARNING | [ ] Unused variable $key. (DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable)
 87 | WARNING | [ ] Unused variable $key. (DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable)
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------

Time: 4.06 secs; Memory: 12MB
๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Dharti Patel

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs work 12 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dave reid Nebraska USA

    I cannot cleanly merge the MR currently with 8.x-1.x, it needs to be updated.

  • First commit to issue fork.
  • Status changed to Needs review 12 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankithashetty Karnataka, India

    Fixed conflicts in MR and rebased it.
    Noticed additional phpcs errors:

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

    FILE: /entity_embed/entity_embed.api.php
    ----------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------
     1 | ERROR | [x] Missing file doc comment
     5 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
    
    
    FILE: /entity_embed_test/src/Controller/TestEntityEmbedController.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------
     13 | WARNING | Line exceeds 80 characters; contains 81 characters
    ---------------------------------------------------------------------------------------------------------------------------
    
    FILE: /entity_embed/tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
    ---------------------------------------------------------------------------------------------------------------------------
      52 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     213 | ERROR   | [ ] The array declaration extends to column 116 (the limit is 80). The array content should be split up over multiple lines
     275 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     276 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     278 | ERROR   | [ ] The array declaration extends to column 106 (the limit is 80). The array content should be split up over multiple lines
     557 | ERROR   | [x] Missing function doc comment
     757 | WARNING | [ ] Unused variable $page.
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: entity_embed/tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------- 56 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/tests/src/Kernel/UpgradePathTest.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------
      99 | ERROR | [x] Array indentation error, expected 16 spaces but found 18
     102 | ERROR | [x] Array indentation error, expected 16 spaces but found 18
    
    
    FILE: /entity_embed/entity_embed.module
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
    ---------------------------------------------------------------------------------------------------------------------------
      11 | WARNING | [x] Unused use statement
      12 | WARNING | [x] Unused use statement
      13 | WARNING | [x] Unused use statement
     329 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/entity_embed.install
    ----------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------
      9 | ERROR | [ ] Doc comment short description must start with a capital letter
      9 | ERROR | [x] Doc comment star missing
     10 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
    
    FILE: /entity_embed/src/Form/EntityEmbedDialog.php
    --------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------
      98 | ERROR | [ ] Parameter $file_url_generator is not described in comment
     113 | ERROR | [ ] Missing parameter name
     433 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
    --------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Plugin/CKEditor5Plugin/DrupalEntityDeriver.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------
     15 | ERROR | [x] Missing class doc comment
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Plugin/CKEditor5Plugin/DrupalEntity.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------
     16 | ERROR   | Missing short description in doc comment
     29 | WARNING | Line exceeds 80 characters; contains 154 characters
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------
      74 | ERROR | Public method name "EntityEmbed::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in lowerCamel format
      93 | ERROR | Public method name "EntityEmbed::mapCKEditor4SettingsToCKEditor5Configuration" is not in lowerCamel format
     100 | ERROR | Public method name "EntityEmbed::computeCKEditor5PluginSubsetConfiguration" is not in lowerCamel format
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Plugin/Filter/EntityEmbedFilter.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------
      90 | ERROR | Parameter $file_url_generator is not described in comment
     107 | ERROR | Missing parameter name
    -----------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Controller/EditEmbeddedEntity.php
    ---------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ---------------------------------------------------------------------------------------------------------------------
      7 | ERROR   | [x] Missing class doc comment
     21 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     23 | ERROR   | [x] Expected 1 blank line after function; 3 found
    Fix the js files (that had broke the module) and the last PHPCS in entity_embeded.module.
     26 | ERROR   | [ ] More than 2 empty lines are not allowed
     27 | ERROR   | [x] The closing brace for the class must have an empty line before it
    ---------------------------------------------------------------------------------------------------------------------
    

    Fixed these in the latest commit in the same MR.
    Pending warnings are:

    FILE: /entity_embed/src/Plugin/CKEditor5Plugin/DrupalEntity.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------
     31 | WARNING | Line exceeds 80 characters; contains 154 characters
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /entity_embed/src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------
      74 | ERROR | Public method name "EntityEmbed::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem" is not in lowerCamel format
      93 | ERROR | Public method name "EntityEmbed::mapCKEditor4SettingsToCKEditor5Configuration" is not in lowerCamel format
     100 | ERROR | Public method name "EntityEmbed::computeCKEditor5PluginSubsetConfiguration" is not in lowerCamel format
    ---------------------------------------------------------------------------------------------------------------------------

    Thank you!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Vivek Panicker Kolkata

    Vivek Panicker โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    12 months ago
    Total: 249s
    #56016
  • Pipeline finished with Failed
    12 months ago
    Total: 1245s
    #56017
  • Status changed to Needs work 10 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Pipeline finished with Canceled
    10 months ago
    Total: 104s
    #77915
  • Pipeline finished with Failed
    10 months ago
    #77920
  • Pipeline finished with Canceled
    10 months ago
    Total: 32s
    #77923
  • Pipeline finished with Failed
    10 months ago
    #77924
  • Pipeline finished with Failed
    10 months ago
    #77926
  • Pipeline finished with Failed
    10 months ago
    Total: 998s
    #77944
  • Pipeline finished with Failed
    10 months ago
    Total: 987s
    #77960
  • Pipeline finished with Failed
    10 months ago
    #78234
  • Pipeline finished with Canceled
    10 months ago
    #78258
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I added changes to fix phpunit tests, but I think these changes need to be moved to separate issue.
    Also I suggest to have scheduled pipeline run for main dev branch, to run tests once in a week.

  • Pipeline finished with Failed
    10 months ago
    Total: 1086s
    #78261
  • Status changed to Needs review 10 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I moved changes to fix phpunit test to separate issue ๐Ÿ“Œ Fix tests Needs review .
    But I add changes to this MR as well, to check that tests will pass.

  • Pipeline finished with Failed
    10 months ago
    Total: 951s
    #78374
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Pipeline finished with Failed
    10 months ago
    Total: 1103s
    #78381
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I removed all the changes from MR, that is not related to phpcs report.
    Only changes for unit tests left in the MR, to check that tests will pass.

    I think it's ready for review now.

    P. S. I haven't rights to resolve threads in the MR.

  • Pipeline finished with Failed
    10 months ago
    Total: 1086s
    #78390
  • Status changed to Needs work 10 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Tests failed, needs work.

  • Pipeline finished with Failed
    10 months ago
    Total: 943s
    #78504
  • Pipeline finished with Success
    10 months ago
    #78510
  • Pipeline finished with Success
    10 months ago
    Total: 849s
    #78511
  • Status changed to Needs review 10 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I hope tests will pass this time.
    Changes to fix tests made in ๐Ÿ“Œ Fix tests Needs review , it would be great to merge that issue first.

    I have an idea to remove adding Dependency Injection to

    1. EditEmbeddedEntity
    2. EntityEmbedBuilder

    from changes to simplify this MR, and move it to separate issue.

    Some changes that I removed from MR, makes sense to implement in code base.
    E.g. b5456b6, 13c0c7726.
    But I think should be done in separate issues.

  • Status changed to Needs work 4 months ago
  • Hi @AnkShetty @vivekp27 @Nikolay Shapovalov,

    Confirmed your changes in MR !13 can be applied successfully, however, there are still errors reported. Please see below:

    entity_embed git:(8.x-1.6) curl https://git.drupalcode.org/project/entity_embed/-/merge_requests/13.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 43320    0 43320    0     0  91347      0 --:--:-- --:--:-- --:--:-- 92762
    patching file .gitlab-ci.yml
    patching file entity_embed.api.php
    patching file entity_embed.install
    patching file entity_embed.module
    patching file entity_embed.services.yml
    patching file src/Controller/EditEmbeddedEntity.php
    patching file src/EntityEmbedBuilder.php
    patching file src/EntityEmbedDisplay/EntityEmbedDisplayInterface.php
    patching file src/EntityEmbedDisplay/EntityEmbedDisplayManager.php
    patching file src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php
    patching file src/Form/EntityEmbedDialog.php
    patching file src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
    patching file src/Plugin/CKEditor5Plugin/DrupalEntity.php
    patching file src/Plugin/CKEditor5Plugin/DrupalEntityDeriver.php
    patching file src/Plugin/CKEditorPlugin/DrupalEntity.php
    patching file src/Plugin/Derivative/FieldFormatterDeriver.php
    patching file src/Plugin/Filter/EntityEmbedFilter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/MediaImageDecorator.php
    patching file tests/modules/entity_embed_test/entity_embed_test.routing.yml
    patching file tests/modules/entity_embed_test/src/Controller/TestEntityEmbedController.php
    patching file tests/src/Functional/EntityEmbedEntityBrowserTest.php
    patching file tests/src/Functional/EntityEmbedTestBase.php
    patching file tests/src/Functional/ViewModeFieldFormatterTest.php
    patching file tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
    patching file tests/src/FunctionalJavascript/ConfigurationUiTest.php
    patching file tests/src/FunctionalJavascript/ContentTranslationTest.php
    patching file tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
    patching file tests/src/FunctionalJavascript/MediaImageTest.php
    patching file tests/src/FunctionalJavascript/SortableTestTrait.php
    patching file tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
    patching file tests/src/Kernel/EntityEmbedFilterTest.php
    patching file tests/src/Kernel/EntityEmbedFilterTestBase.php
    patching file tests/src/Kernel/UpgradePathTest.php
    โžœ  entity_embed git:(8.x-1.6) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig entity_embed
    
    FILE: ...ssue/web/modules/contrib/entity_embed/tests/src/Kernel/UpgradePathTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...terns/Demo-site/drupal-orgissue/web/modules/contrib/entity_embed/README.md
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
     21 | WARNING | Line exceeds 80 characters; contains 91 characters
     30 | WARNING | Line exceeds 80 characters; contains 201 characters
     73 | WARNING | Line exceeds 80 characters; contains 231 characters
    --------------------------------------------------------------------------------
    
    
    FILE: ...es/contrib/entity_embed/src/Plugin/CKEditor5Plugin/DrupalEntityDeriver.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...b/modules/contrib/entity_embed/src/Plugin/CKEditor5Plugin/DrupalEntity.php
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
     79 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...odules/contrib/entity_embed/src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     50 | ERROR | [x] The first parameter of a multi-line function declaration must
        |       |     be on the line after the opening bracket
     53 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 2.77 secs; Memory: 16MB

    Kindly check

    Thanks,
    Jake

  • First commit to issue fork.
  • Status changed to Needs review 4 months ago
  • Pipeline finished with Failed
    4 months ago
    #227456
  • Status changed to RTBC 3 months ago
  • Hi @atul_ghate,

    I applied the latest changes on MR !13, it was applied smoothly and confirmed no errors were reported.

    entity_embed git:(8.x-1.6) curl https://git.drupalcode.org/project/entity_embed/-/merge_requests/13.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 47083    0 47083    0     0  71663      0 --:--:-- --:--:-- --:--:-- 72435
    patching file .gitlab-ci.yml
    patching file README.md
    patching file entity_embed.api.php
    patching file entity_embed.install
    patching file entity_embed.module
    patching file entity_embed.services.yml
    patching file src/Controller/EditEmbeddedEntity.php
    patching file src/EntityEmbedBuilder.php
    patching file src/EntityEmbedDisplay/EntityEmbedDisplayInterface.php
    patching file src/EntityEmbedDisplay/EntityEmbedDisplayManager.php
    patching file src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php
    patching file src/Form/EntityEmbedDialog.php
    patching file src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php
    patching file src/Plugin/CKEditor5Plugin/DrupalEntity.php
    patching file src/Plugin/CKEditor5Plugin/DrupalEntityDeriver.php
    patching file src/Plugin/CKEditorPlugin/DrupalEntity.php
    patching file src/Plugin/Derivative/FieldFormatterDeriver.php
    patching file src/Plugin/Filter/EntityEmbedFilter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php
    patching file src/Plugin/entity_embed/EntityEmbedDisplay/MediaImageDecorator.php
    patching file tests/modules/entity_embed_test/entity_embed_test.routing.yml
    patching file tests/modules/entity_embed_test/src/Controller/TestEntityEmbedController.php
    patching file tests/src/Functional/EntityEmbedEntityBrowserTest.php
    patching file tests/src/Functional/EntityEmbedTestBase.php
    patching file tests/src/Functional/ViewModeFieldFormatterTest.php
    patching file tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php
    patching file tests/src/FunctionalJavascript/ConfigurationUiTest.php
    patching file tests/src/FunctionalJavascript/ContentTranslationTest.php
    patching file tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
    patching file tests/src/FunctionalJavascript/MediaImageTest.php
    patching file tests/src/FunctionalJavascript/SortableTestTrait.php
    patching file tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
    patching file tests/src/Kernel/EntityEmbedFilterTest.php
    patching file tests/src/Kernel/EntityEmbedFilterTestBase.php
    patching file tests/src/Kernel/UpgradePathTest.php
    โžœ  entity_embed git:(8.x-1.6) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig entity_embed
    โžœ  contrib git:(main) โœ—

    Will now move this to RTBC

    Thanks,
    Jake

  • Pipeline finished with Failed
    3 months ago
    Total: 513s
    #254234
Production build 0.71.5 2024