Magento Coding Standard (PHPCS) report for loki/magento2-admin-components ========================================================================= Package version: 0.8.0 | Magento: 2.4.9 | Tested: 2026-10-13 1 error, 109 warnings in 40 files Form/Action/SaveAction.php 47:30 warning array_merge(...) is used in a loop and is a resources greedy construction. (Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge) 66:9 warning The use of function call_user_func() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) Form/Field/FieldTypeProvider.php 24:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 30:9 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) Form/Field/Field.php 114:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) Form/Field/FieldsResolver.php 82:31 warning array_merge(...) is used in a loop and is a resources greedy construction. (Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge) Form/Item/ItemResolver.php 30:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) Form/Item/ItemValidatorInterface.php 11:49 error 'true' return type is not present in PHP version 8.1 or earlier (PHPCompatibility.FunctionDeclarations.NewReturnTypeDeclarations.trueFound) ViewModel/Form/Field/Editor.php 37:5 warning Function closing brace must go on the next line following the body; found 1 blank lines before brace (PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose) ViewModel/Options/StatusOptions.php 15:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 26:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) ViewModel/Options/YesNoOptions.php 14:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 20:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) ViewModel/Customer.php 21:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) ViewModel/Product.php 21:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) Service/CategorySelection/CategoryTreeBuilder.php 103:13 warning $storeId parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 136:13 warning $flatCategories parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 151:13 warning $flatCategories parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 151:13 warning $parentId parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 203:13 warning $cacheKey parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 227:16 warning Opening parenthesis of a multi-line function call must be the last content on the line (PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket) Filter/Security.php 16:8 warning Line indented incorrectly; expected 8 spaces, found 7 (Generic.WhiteSpace.ScopeIndent.IncorrectExact) 18:9 warning Closing brace indented incorrectly; expected 7 spaces, found 8 (Squiz.WhiteSpace.ScopeClosingBrace.Indent) Grid/Filter/FilterFactory.php 21:5 warning The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line (Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace) Grid/Filter/StaticFilterInterface.php 13:1 warning Expected 1 blank line at end of file; 2 found (PSR2.Files.EndFileNewline.TooMany) Grid/Cell/CellFactory.php 11:5 warning There must be a single space between the closing parenthesis/return type and the opening brace of a multi-line function declaration; found 0 spaces (Squiz.Functions.MultiLineFunctionDeclaration.SpaceBeforeOpenBrace) Grid/State.php 216:11 warning Expected 1 space after CATCH keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) Ui/Button/ButtonFactory.php 74:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 78:122 warning Line exceeds 120 characters; contains 122 characters (Generic.Files.LineLength.TooLong) 80:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) Component/Form/FormViewModel.php 103:12 warning Motivation behind the added @deprecated tag MUST be explained. @see tag MUST be used with reference to new implementation when code is deprecated and there is a new alternative. (Magento2.Annotation.MethodAnnotationStructure.InvalidDeprecatedTagUsage) 127:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) Component/Form/FormRepository.php 115:15 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) Component/Grid/GridViewModel.php 110:124 warning Line exceeds 120 characters; contains 124 characters (Generic.Files.LineLength.TooLong) 111:11 warning Expected 1 space after CATCH keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 150:16 warning The use of function call_user_func() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 283:38 warning array_merge(...) is used in a loop and is a resources greedy construction. (Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge) 293:50 warning Expected 1 space after FUNCTION keyword; 0 found (Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction) 384:12 warning Motivation behind the added @deprecated tag MUST be explained. @see tag MUST be used with reference to new implementation when code is deprecated and there is a new alternative. (Magento2.Annotation.MethodAnnotationStructure.InvalidDeprecatedTagUsage) Controller/Adminhtml/Index/Entity.php 11:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) view/adminhtml/templates/form/field_type/entity_select.phtml 60:81 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 119:67 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 135:67 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/field_type/product_id.phtml 33:36 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 34:32 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 37:73 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 54:56 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/field_type/entity_select/table.phtml 67:23 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 81:21 warning Line indented incorrectly; expected at least 34 spaces, found 20 (Generic.WhiteSpace.ScopeIndent.Incorrect) 148:63 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) view/adminhtml/templates/form/field_type/select.phtml 32:36 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 33:32 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 36:73 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 54:39 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/field_type/pagebuilder.phtml 55:77 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 56:9 warning Line indented incorrectly; expected at least 12 spaces, found 8 (Generic.WhiteSpace.ScopeIndent.Incorrect) view/adminhtml/templates/form/field_type/editor.phtml 28:77 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/field_type/input.phtml 34:73 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/field_type/textarea.phtml 25:73 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form/actions.phtml 30:51 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 41:52 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) view/adminhtml/templates/form.phtml 34:49 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 35:49 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 53:76 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 54:39 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) view/adminhtml/templates/grid.phtml 23:45 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 29:53 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 34:65 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 35:65 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 37:61 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 40:61 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 43:61 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 44:61 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 45:61 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 52:65 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) 57:53 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) view/adminhtml/templates/grid/table.phtml 62:23 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 76:21 warning Line indented incorrectly; expected at least 34 spaces, found 20 (Generic.WhiteSpace.ScopeIndent.Incorrect) 143:63 warning Space after opening parenthesis of function call prohibited (PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket) view/adminhtml/templates/grid/search.phtml 35:166 warning Expected 0 spaces before closing parenthesis; 1 found (PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket) 36:52 warning Expected 0 spaces before closing parenthesis; 1 found (PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket) view/adminhtml/templates/grid/cell/store_id.phtml 27:47 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 28:15 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 28:15 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 32:60 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 33:27 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 33:27 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 37:70 warning Expected 0 spaces after closing parenthesis; found 1 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 38:39 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 38:39 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) view/adminhtml/templates/grid/cell/default.phtml 25:1 warning Short echo tag syntax must be used; expected "