Fix the issues reported by phpcs

Created on 20 October 2023, 8 months ago
Updated 29 January 2024, 5 months ago

There are various code style issues which need fixing

phpcs         > FILE: ..._entities_test/src/Controller/ExternalEntitiesJsonController.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >  33 | WARNING | [x] A comma should follow the last multiline array
phpcs         >     |         |     item. Found:
phpcs         >     |         |     '2596b1ba-43bb-4440-9f0c-f1974f733311'
phpcs         >     |         |     (Drupal.Arrays.Array.CommaLastItem)
phpcs         >  58 | ERROR   | [ ] Missing @var tag in member variable comment
phpcs         >     |         |     (Drupal.Commenting.VariableComment.MissingVar)
phpcs         >  59 | ERROR   | [ ] Class property $reference_data should use
phpcs         >     |         |     lowerCamel naming without underscores
phpcs         >     |         |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...sts/modules/external_entities_test/external_entities_test.module
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  6 | ERROR | [x] Expected 1 newline at end of file; 2 found
phpcs         >    |       |     (Drupal.Files.EndFileNewline.TooMany)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...368304/src/FieldMapper/ConfigurableExpressionFieldMapperBase.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  161 | ERROR | [x] Each PHP statement must be on a line by itself
phpcs         >      |       |     (Generic.Formatting.DisallowMultipleStatements.SameLine)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...l_entities-3368304/src/FieldMapper/ExpressionFieldMapperBase.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >    6 | ERROR   | [x] Use statements should be sorted alphabetically.
phpcs         >      |         |     The first wrong one is
phpcs         >      |         |     Drupal\Core\Datetime\DrupalDateTime.
phpcs         >      |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
phpcs         >  176 | ERROR   | [x] Functions must not contain multiple empty lines
phpcs         >      |         |     in a row; found 2 empty lines
phpcs         >      |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines)
phpcs         >  217 | WARNING | [x] A comma should follow the last multiline array
phpcs         >      |         |     item. Found: ]
phpcs         >      |         |     (Drupal.Arrays.Array.CommaLastItem)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...om/external_entities-3368304/src/FieldMapper/FieldMapperBase.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  92 | ERROR | [x] Use null coalesce operator instead of ternary
phpcs         >     |       |     operator.
phpcs         >     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...ternal_entities-3368304/src/Routing/ExternalEntityTypeRoutes.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  31 | ERROR | Parameter $module_handler is not described in
phpcs         >     |       | comment
phpcs         >     |       | (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...s/custom/external_entities-3368304/src/Entity/ExternalEntity.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >   80 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  232 | ERROR   | [x] @inheritDoc found. Did you mean
phpcs         >      |         |     {@inheritDoc}?
phpcs         >      |         |     (Drupal.Commenting.DocComment.InheritDocWithoutBraces)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...xternal_entities-3368304/src/Entity/Query/External/Condition.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  24 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >     |         |     delimiters
phpcs         >     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...stom/external_entities-3368304/src/Entity/ExternalEntityType.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  97 | WARNING | Line exceeds 80 characters; contains 84
phpcs         >     |         | characters (Drupal.Files.LineLength.TooLong)
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...om/external_entities-3368304/src/Form/ExternalEntityTypeForm.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >  670 | ERROR   | [ ] The array declaration extends to column 121 (the
phpcs         >      |         |     limit is 120). The array content should be split
phpcs         >      |         |     up over multiple lines
phpcs         >      |         |     (Drupal.Arrays.Array.LongLineDeclaration)
phpcs         >  683 | ERROR   | [ ] The array declaration extends to column 122 (the
phpcs         >      |         |     limit is 120). The array content should be split
phpcs         >      |         |     up over multiple lines
phpcs         >      |         |     (Drupal.Arrays.Array.LongLineDeclaration)
phpcs         >  691 | ERROR   | [ ] The array declaration extends to column 121 (the
phpcs         >      |         |     limit is 120). The array content should be split
phpcs         >      |         |     up over multiple lines
phpcs         >      |         |     (Drupal.Arrays.Array.LongLineDeclaration)
phpcs         >  761 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  791 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ..._entities-3368304/src/ResponseDecoder/ResponseDecoderFactory.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  29 | ERROR | [x] Use null coalesce operator instead of ternary
phpcs         >     |       |     operator.
phpcs         >     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...om/external_entities-3368304/src/ExternalEntityTypeInterface.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  5 | WARNING | [x] Unused use statement
phpcs         >    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...es-3368304/src/StorageClient/ExternalEntityStorageClientBase.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  91 | ERROR | [x] Use null coalesce operator instead of ternary
phpcs         >     |       |     operator.
phpcs         >     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...s/custom/external_entities-3368304/src/ExternalEntityStorage.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >  189 | ERROR   | [x] Data types in @throws tags need to be fully
phpcs         >      |         |     namespaced
phpcs         >      |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
phpcs         >  204 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  237 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  333 | ERROR   | [x] Expected newline after closing brace
phpcs         >      |         |     (Drupal.ControlStructures.ControlSignature.NewlineAfterCloseBrace)
phpcs         >  373 | ERROR   | [x] Data types in @throws tags need to be fully
phpcs         >      |         |     namespaced
phpcs         >      |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
phpcs         >  386 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...entities-3368304/src/Event/ExternalEntityExtractRawDataEvent.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 1 ERROR AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  6 | ERROR | [x] Use statements should be sorted alphabetically. The
phpcs         >    |       |     first wrong one is
phpcs         >    |       |     Drupal\external_entities\ExternalEntityInterface.
phpcs         >    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...04/src/Plugin/ExternalEntities/FieldMapper/SimpleFieldMapper.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 27 ERRORS AND 1 WARNING AFFECTING 28 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >    8 | WARNING | [x] Unused use statement
phpcs         >      |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
phpcs         >   13 | ERROR   | [ ] Doc comment short description must be on a
phpcs         >      |         |     single line, further text should be a separate
phpcs         >      |         |     paragraph
phpcs         >      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
phpcs         >  101 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_data"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  102 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$context"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  124 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_values"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  125 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_data"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  126 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$context"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  165 | ERROR   | [ ] Doc comment short description must be on a
phpcs         >      |         |     single line, further text should be a separate
phpcs         >      |         |     paragraph
phpcs         >      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
phpcs         >  173 | ERROR   | [x] Data types in @param tags need to be fully
phpcs         >      |         |     namespaced
phpcs         >      |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
phpcs         >  183 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_data"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  184 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$remaining_mapping_keys"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  185 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$seen_mapping_keys"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  187 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_delta"; 22 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  188 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_property_name"; 19 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  201 | ERROR   | [x] Inline comments must end in full-stops,
phpcs         >      |         |     exclamation marks, question marks, colons, or
phpcs         >      |         |     closing parentheses
phpcs         >      |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
phpcs         >  211 | ERROR   | [x] Inline comments must end in full-stops,
phpcs         >      |         |     exclamation marks, question marks, colons, or
phpcs         >      |         |     closing parentheses
phpcs         >      |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
phpcs         >  230 | ERROR   | [ ] Doc comment short description must be on a
phpcs         >      |         |     single line, further text should be a separate
phpcs         >      |         |     paragraph
phpcs         >      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
phpcs         >  237 | ERROR   | [x] Data types in @param tags need to be fully
phpcs         >      |         |     namespaced
phpcs         >      |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
phpcs         >  247 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_data"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  248 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_keys"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  250 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_delta"; 22 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  251 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_property_name"; 19 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  258 | ERROR   | [ ] Doc comment short description must be on a
phpcs         >      |         |     single line, further text should be a separate
phpcs         >      |         |     paragraph
phpcs         >      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
phpcs         >  266 | ERROR   | [x] Data types in @param tags need to be fully
phpcs         >      |         |     namespaced
phpcs         >      |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
phpcs         >  271 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$raw_data"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  272 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$remaining_mapping_keys"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  273 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$seen_mapping_keys"; 20 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         >  275 | ERROR   | [x] Expected 1 space between type hint and argument
phpcs         >      |         |     "$field_property_name"; 19 found
phpcs         >      |         |     (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...ities-3368304/src/Plugin/ExternalEntities/StorageClient/Rest.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >  373 | WARNING | [x] 'TODO: Apply parameter operator.' should match
phpcs         >      |         |     the format '@todo Fix problem X here.'
phpcs         >      |         |     (Drupal.Commenting.TodoComment.TodoFormat)
phpcs         >  434 | WARNING | [x] 'TODO: Apply parameter operator.' should match
phpcs         >      |         |     the format '@todo Fix problem X here.'
phpcs         >      |         |     (Drupal.Commenting.TodoComment.TodoFormat)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...tities-3368304/src/Plugin/Field/AnnotationTitleFieldItemList.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >  26 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >     |         |     delimiters
phpcs         >     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  31 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >     |         |     delimiters
phpcs         >     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: .../external_entities-3368304/src/ExternalEntityTypeListBuilder.php
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
phpcs         > ----------------------------------------------------------------------
phpcs         >  40 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >     |         |     delimiters
phpcs         >     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > FILE: ...odules/custom/external_entities-3368304/external_entities.module
phpcs         > ----------------------------------------------------------------------
phpcs         > FOUND 7 ERRORS AND 9 WARNINGS AFFECTING 15 LINES
phpcs         > ----------------------------------------------------------------------
phpcs         >   20 | ERROR   | [x] Use statements should be sorted alphabetically.
phpcs         >      |         |     The first wrong one is
phpcs         >      |         |     Drupal\Core\Render\Element.
phpcs         >      |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
phpcs         >   51 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >   90 | WARNING | [ ] Only string literals should be passed to t()
phpcs         >      |         |     where possible
phpcs         >      |         |     (Drupal.Semantics.FunctionT.NotLiteralString)
phpcs         >   91 | WARNING | [ ] Only string literals should be passed to t()
phpcs         >      |         |     where possible
phpcs         >      |         |     (Drupal.Semantics.FunctionT.NotLiteralString)
phpcs         >   92 | WARNING | [ ] Only string literals should be passed to t()
phpcs         >      |         |     where possible
phpcs         >      |         |     (Drupal.Semantics.FunctionT.NotLiteralString)
phpcs         >  129 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  203 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  240 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  374 | ERROR   | [x] Expected 1 space(s) before asterisk; 3 found
phpcs         >      |         |     (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar)
phpcs         >  375 | ERROR   | [x] Expected 1 space(s) before asterisk; 3 found
phpcs         >      |         |     (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar)
phpcs         >  376 | ERROR   | [x] Expected 1 space(s) before asterisk; 3 found
phpcs         >      |         |     (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar)
phpcs         >  378 | ERROR   | [x] Parameter comment indentation must be 3 spaces,
phpcs         >      |         |     found 1 spaces
phpcs         >      |         |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
phpcs         >  379 | ERROR   | [x] Parameter comment indentation must be 3 spaces,
phpcs         >      |         |     found 1 spaces
phpcs         >      |         |     (Drupal.Commenting.FunctionComment.ParamCommentIndentation)
phpcs         >  379 | ERROR   | [x] Parameter comment must end with a full stop
phpcs         >      |         |     (Drupal.Commenting.FunctionComment.ParamCommentFullStop)
phpcs         >  391 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         >  404 | WARNING | [x] Inline @var declarations should use the /** */
phpcs         >      |         |     delimiters
phpcs         >      |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > Time: 2.13 secs; Memory: 8MB
phpcs         > 
phpcs         > 
phpcs         > PHP CODE SNIFFER REPORT SUMMARY
phpcs         > ----------------------------------------------------------------------
phpcs         > FILE                                                  ERRORS  WARNINGS
phpcs         > ----------------------------------------------------------------------
phpcs         > ...xternal_entities-3368304/external_entities.module  7       9
phpcs         > ...al_entities-3368304/src/ExternalEntityStorage.php  3       3
phpcs         > ...ities-3368304/src/ExternalEntityTypeInterface.php  0       1
phpcs         > ...ies-3368304/src/ExternalEntityTypeListBuilder.php  0       1
phpcs         > ...al_entities-3368304/src/Entity/ExternalEntity.php  1       1
phpcs         > ...ntities-3368304/src/Entity/ExternalEntityType.php  0       1
phpcs         > ...s-3368304/src/Entity/Query/External/Condition.php  0       1
phpcs         > ...4/src/Event/ExternalEntityExtractRawDataEvent.php  1       0
phpcs         > ...dMapper/ConfigurableExpressionFieldMapperBase.php  1       0
phpcs         > ...304/src/FieldMapper/ExpressionFieldMapperBase.php  2       1
phpcs         > ...ities-3368304/src/FieldMapper/FieldMapperBase.php  1       0
phpcs         > ...ities-3368304/src/Form/ExternalEntityTypeForm.php  3       2
phpcs         > ...xternalEntities/FieldMapper/SimpleFieldMapper.php  27      1
phpcs         > ...rc/Plugin/ExternalEntities/StorageClient/Rest.php  0       2
phpcs         > ...src/Plugin/Field/AnnotationTitleFieldItemList.php  0       2
phpcs         > ...04/src/ResponseDecoder/ResponseDecoderFactory.php  1       0
phpcs         > ...-3368304/src/Routing/ExternalEntityTypeRoutes.php  1       0
phpcs         > ...StorageClient/ExternalEntityStorageClientBase.php  1       0
phpcs         > ...ernal_entities_test/external_entities_test.module  1       0
phpcs         > ...src/Controller/ExternalEntitiesJsonController.php  2       1
phpcs         > ----------------------------------------------------------------------
phpcs         > A TOTAL OF 52 ERRORS AND 26 WARNINGS WERE FOUND IN 54 FILES
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX 64 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
phpcs         > ----------------------------------------------------------------------
phpcs         > 
phpcs         > 
phpcs         > PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
phpcs         > ----------------------------------------------------------------------
phpcs         >     SOURCE                                                       COUNT
phpcs         > ----------------------------------------------------------------------
phpcs         > [x] Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingA  18
phpcs         > [x] Drupal.Commenting.InlineVariableComment.VarInline            16
phpcs         > [x] Drupal.Commenting.DataTypeNamespace.DataTypeNamespace        5
phpcs         > [ ] Drupal.Commenting.DocComment.ShortSingleLine                 4
phpcs         > [ ] Drupal.Arrays.Array.LongLineDeclaration                      3
phpcs         > [x] Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar        3
phpcs         > [ ] Drupal.Semantics.FunctionT.NotLiteralString                  3
phpcs         > [x] SlevomatCodingStandard.ControlStructures.RequireNullCoalesc  3
phpcs         > [x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.  3
phpcs         > [x] Drupal.Arrays.Array.CommaLastItem                            2
phpcs         > [x] Drupal.Classes.UnusedUseStatement.UnusedUse                  2
phpcs         > [x] Drupal.Commenting.FunctionComment.ParamCommentIndentation    2
phpcs         > [x] Drupal.Commenting.InlineComment.InvalidEndChar               2
phpcs         > [x] Drupal.Commenting.TodoComment.TodoFormat                     2
phpcs         > [x] Drupal.Commenting.DocComment.InheritDocWithoutBraces         1
phpcs         > [x] Drupal.Commenting.FunctionComment.ParamCommentFullStop       1
phpcs         > [ ] Drupal.Commenting.FunctionComment.ParamMissingDefinition     1
phpcs         > [ ] Drupal.Commenting.VariableComment.MissingVar                 1
phpcs         > [x] Drupal.ControlStructures.ControlSignature.NewlineAfterClose  1
phpcs         > [x] Drupal.Files.EndFileNewline.TooMany                          1
phpcs         > [ ] Drupal.Files.LineLength.TooLong                              1
phpcs         > [ ] Drupal.NamingConventions.ValidVariableName.LowerCamelName    1
phpcs         > [x] Generic.Formatting.DisallowMultipleStatements.SameLine       1
phpcs         > [x] Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines            1
phpcs         > ----------------------------------------------------------------------
phpcs         > A TOTAL OF 78 SNIFF VIOLATIONS WERE FOUND IN 24 SOURCES
phpcs         > ----------------------------------------------------------------------
phpcs         > PHPCBF CAN FIX THE 17 MARKED SOURCES AUTOMATICALLY (64 VIOLATIONS IN TOTAL)
phpcs         > ----------------------------------------------------------------------

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml external_entities/
๐Ÿ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands pefferen

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

Production build 0.69.0 2024