Magento Coding Standard (PHPCS) report for mage/gridjs ====================================================== Package version: 5.1.11 | Magento: 2.4.9 | Tested: 2026-05-27 68 errors, 211 warnings in 28 files ViewModel/Grid.php 34:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 34:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) ViewModel/GenericViewModelGrid.php 20:4 warning Line exceeds 120 characters; contains 135 characters (Generic.Files.LineLength.TooLong) 39:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 44:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 137:31 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 213:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 224:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 244:51 warning There must be exactly one blank line between lines short and long descriptions (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 281:137 warning Line exceeds 120 characters; contains 137 characters (Generic.Files.LineLength.TooLong) 286:21 warning Expected 1 space after closing brace; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace) 287:21 warning Expected "} else {\n"; found "}\n else {\n" (PEAR.ControlStructures.ControlSignature.Found) 297:13 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 297:13 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 297:70 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 305:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) 349:7 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 369:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 378:12 warning @param is not found for one or more params in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 390:17 warning The use of function header() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 391:17 error Use of echo language construct is discouraged. (Magento2.Security.LanguageConstruct.DirectOutput) 392:17 error Use of exit language construct is discouraged. (Magento2.Security.LanguageConstruct.ExitUsage) 394:17 warning The use of function header() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 395:17 error Use of echo language construct is discouraged. (Magento2.Security.LanguageConstruct.DirectOutput) 396:17 error Use of exit language construct is discouraged. (Magento2.Security.LanguageConstruct.ExitUsage) 446:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 457:5 warning Visibility must be declared on method "setFields" (Squiz.Scope.MethodScope.Missing) 463:15 warning Usage of ELSE IF is discouraged; use ELSEIF instead (PSR2.ControlStructures.ElseIfDeclaration.NotAllowed) 506:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 506:21 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 515:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 518:5 warning Visibility must be declared on method "setSqlQuery" (Squiz.Scope.MethodScope.Missing) 526:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 526:27 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 528:5 warning Visibility must be declared on method "executeSqlQuery" (Squiz.Scope.MethodScope.Missing) 539:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 542:5 warning Visibility must be declared on method "setTableName" (Squiz.Scope.MethodScope.Missing) 550:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 550:27 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 552:5 warning Visibility must be declared on method "getTableName" (Squiz.Scope.MethodScope.Missing) 559:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 559:21 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 561:5 warning Visibility must be declared on method "getFields" (Squiz.Scope.MethodScope.Missing) 566:5 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 566:5 warning Visibility must be declared on method "getFieldsConfig" (Squiz.Scope.MethodScope.Missing) 573:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 576:5 warning Visibility must be declared on method "setFieldsNames" (Squiz.Scope.MethodScope.Missing) 581:15 warning Usage of ELSE IF is discouraged; use ELSEIF instead (PSR2.ControlStructures.ElseIfDeclaration.NotAllowed) 590:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 590:21 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 592:5 warning Visibility must be declared on method "getFieldsNames" (Squiz.Scope.MethodScope.Missing) 599:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 602:5 warning Visibility must be declared on method "setFilters" (Squiz.Scope.MethodScope.Missing) 610:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 610:21 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 612:5 warning Visibility must be declared on method "getFilters" (Squiz.Scope.MethodScope.Missing) 623:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 623:39 warning There must be exactly one blank line between lines short and long descriptions (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 632:23 warning Usage of ELSE IF is discouraged; use ELSEIF instead (PSR2.ControlStructures.ElseIfDeclaration.NotAllowed) 635:25 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 635:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 638:21 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 641:15 warning Exceptions must not be handled in the same function where they are thrown. (Magento2.Exceptions.ThrowCatch.ThrowCatch) 657:55 error The use of function md5() is forbidden; use improved hash functions (SHA-256, SHA-512 etc.)() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 734:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 745:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 759:27 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 770:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 782:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) Plugin/Admin/SecretKeyValidator.php 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 29:12 warning Missing @param for argument in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 33:13 error Identical operator === is not used for testing the return value of strpos function (Magento2.PHP.ReturnValueCheck.ImproperValueTesting) 34:17 error Identical operator === is not used for testing the return value of strpos function (Magento2.PHP.ReturnValueCheck.ImproperValueTesting) Plugin/WebapiAuthorizationPlugin.php 57:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 57:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/Grid.php 138:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 138:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/ObfuscateProcessor.php 8:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 15:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 15:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/StatusProcessor.php 9:19 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 39:20 warning The use of function htmlspecialchars() is discouraged; use \Magento\Framework\Escaper->escapeHtml() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 41:13 warning Line exceeds 120 characters; contains 220 characters (Generic.Files.LineLength.TooLong) 50:13 warning The use of function htmlspecialchars() is discouraged; use \Magento\Framework\Escaper->escapeHtml() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) Model/DataProcessor/ChainProcessor.php 13:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 51:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 55:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 55:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/IdProcessor.php 5:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 10:19 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 12:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 39:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 39:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/DateProcessor.php 8:19 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 10:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 30:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 30:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/PriceProcessor.php 8:19 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 24:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 24:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/DataProcessor/DefaultProcessor.php 9:19 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 11:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 21:16 warning The use of function htmlspecialchars() is discouraged; use \Magento\Framework\Escaper->escapeHtml() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 24:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 28:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 28:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/Fields/DataSourceInterface.php 8:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 15:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 22:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 29:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 33:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 33:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Model/Fields/DefaultDataSource.php 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 19:5 warning Constants must have short description if they add information beyond what the constant name supplies. (Magento2.Commenting.ConstantsPHPDocFormatting.MissingConstantPHPDoc) 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 31:15 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 38:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 46:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 57:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 57:32 warning Short description should not be in multi lines (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) Model/GridData.php 64:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) etc/module.xml 3:1 warning Spaces must be used to indent lines; tabs are not allowed (Generic.WhiteSpace.DisallowTabIndent.TabsUsed) Controller/Adminhtml/Grid/Index.php 9:15 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 11:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 29:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 36:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) 36:2 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) Controller/Adminhtml/Grid/Data.php 39:12 warning @param is not found for one or more params in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) Controller/Adminhtml/Grid/Filter.php 13:15 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 14:15 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 15:15 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 17:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 27:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 32:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 38:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 66:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 68:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 91:11 warning Exceptions must not be handled in the same function where they are thrown. (Magento2.Exceptions.ThrowCatch.ThrowCatch) 102:13 warning Missing @param for argument in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 126:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) 134:19 warning Line exceeds 120 characters; contains 185 characters (Generic.Files.LineLength.TooLong) 138:19 warning Line exceeds 120 characters; contains 165 characters (Generic.Files.LineLength.TooLong) 139:598 warning Line exceeds 120 characters; contains 598 characters (Generic.Files.LineLength.TooLong) 151:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) 270:13 warning Missing @param for argument in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 277:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) view/adminhtml/templates/grid/filters.phtml 10:1 warning The use of function extract() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 17:13 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 21:36 warning Short echo tag syntax must be used; expected "=" but found "escapeHtml() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 81:43 error Unescaped output detected. (Magento2.Security.XssTemplate.FoundUnescaped) 86:81 error Unescaped output detected. (Magento2.Security.XssTemplate.FoundUnescaped) 87:82 error Unescaped output detected. (Magento2.Security.XssTemplate.FoundUnescaped) 99:1 warning Short PHP opening tag used; expected "" (Magento2.Html.HtmlClosingVoidTags.HtmlClosingVoidElements) 1:1 error Avoid using self-closing tag with non-void html element - "