Magento Coding Standard (PHPCS) report for mgtcommerce/module-mgtdevelopertoolbar ================================================================================= Package version: 1.0.11 | Magento: 2.4.9 | Tested: 2026-05-26 200 errors, 756 warnings in 68 files src/app/code/Mgt/DeveloperToolbar/Helper/Toolbar.php 28:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 29:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 30:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 50:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) 57:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) 92:8 warning $escaper parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 92:8 warning $localeDate parameter is missing in method arguments signature (Magento2.Annotation.MethodArguments.ArgumentMissing) 93:8 warning $resultPageFactory parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 94:8 warning $cache parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 95:8 warning $data parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 99:12 warning Extra @param found in method annotation (Magento2.Annotation.MethodArguments.ExtraParam) 130:12 warning @param is not found for one or more params in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 130:12 warning $token parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 147:34 error The use of function unserialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::unserialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 191:27 error The use of function unserialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::unserialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 198:28 error The use of function unserialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::unserialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) src/app/code/Mgt/DeveloperToolbar/Helper/Format.php 28:5 warning The static declaration must come after the visibility declaration (PSR2.Methods.MethodDeclaration.StaticBeforeVisibility) 28:19 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 34:11 warning Expected "} else {\n"; found "} else {\n" (PEAR.ControlStructures.ControlSignature.Found) 34:11 warning Expected 1 space after ELSE keyword; 2 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 35:13 warning Expected "if (...) {\n"; found "if (...) {\n" (PEAR.ControlStructures.ControlSignature.Found) 35:36 warning Expected 1 space after closing parenthesis; found 2 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 38:13 warning Expected 1 space after closing brace; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace) 39:13 warning Expected "} else if (...) {\n"; found "}\n else if (...) {\n" (PEAR.ControlStructures.ControlSignature.Found) 39:13 warning Usage of ELSE IF is discouraged; use ELSEIF instead (PSR2.ControlStructures.ElseIfDeclaration.NotAllowed) 47:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 55:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Model/Driver/Output/Zero.php 30:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 31:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 32:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 34:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 39:45 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 40:43 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 45:46 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 48:27 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 61:30 error The use of function serialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::serialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 63:59 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 67:28 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 80:30 error The use of function serialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::serialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 83:53 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 88:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) 91:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Model/Config.php 52:8 warning $deploymentConfigWriter parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 53:8 warning $deploymentConfigReader parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 54:8 warning $scopeConfig parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 69:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 75:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 82:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Model/Observer/DataCollector.php 44:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 45:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 46:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 116:8 warning $registry parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 118:8 warning $cache parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 120:8 warning $request parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 121:8 warning $response parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 122:8 warning $cookieManager parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 123:8 warning $eventManager parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 124:8 warning $pluginList parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 125:8 warning $objectManagerConfig parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 126:8 warning $appState parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 129:12 warning Extra @param found in method annotation (Magento2.Annotation.MethodArguments.ExtraParam) 129:12 warning $url duplicate found in method annotation (Magento2.Annotation.MethodArguments.DuplicateParam) 159:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 168:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 188:68 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 199:71 warning Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 224:50 warning Direct use of $_SERVER Superglobal detected. (Magento2.Security.Superglobal.SuperglobalUsageWarning) 228:41 warning Direct use of $_COOKIE Superglobal detected. (Magento2.Security.Superglobal.SuperglobalUsageWarning) 239:28 error The use of function serialize() is forbidden; use \Magento\Framework\Serialize\SerializerInterface::serialize() instead (Magento2.Security.InsecureFunction.FoundWithAlternative) 242:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 258:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 277:25 warning Terminating statement must be indented to the same level as the CASE body (PSR2.ControlStructures.SwitchDeclaration.BreakIndent) 280:25 warning Terminating statement must be indented to the same level as the CASE body (PSR2.ControlStructures.SwitchDeclaration.BreakIndent) 283:25 warning Terminating statement must be indented to the same level as the CASE body (PSR2.ControlStructures.SwitchDeclaration.BreakIndent) 298:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 315:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 317:20 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) src/app/code/Mgt/DeveloperToolbar/Model/Observer/DbProfiler.php 65:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 72:30 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 81:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Model/App/Backend/DirectorPlugin.php 22:1 warning There must be one blank line after the namespace declaration (PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter) 30:5 warning PHP keywords must be lowercase; expected "const" but found "CONST" (Generic.PHP.LowerCaseKeyword.Found) 30:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 31:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 33:5 warning Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 34:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 41:12 warning @param is not found for one or more params in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 66:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) src/app/code/Mgt/DeveloperToolbar/Model/App/FrontController/ToolbarPlugin.php 45:5 warning Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 46:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) src/app/code/Mgt/DeveloperToolbar/Model/Profiler/Driver/Standard/Stat.php 28:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 32:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Model/Feed/Feed.php 30:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 31:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 32:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 108:15 warning Empty FUNCTION statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedFunction) 200:33 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) src/app/code/Mgt/DeveloperToolbar/etc/frontend/routes.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) src/app/code/Mgt/DeveloperToolbar/etc/frontend/events.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 3:1 warning Spaces must be used to indent lines; tabs are not allowed (Generic.WhiteSpace.DisallowTabIndent.TabsUsed) src/app/code/Mgt/DeveloperToolbar/etc/adminhtml/routes.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) src/app/code/Mgt/DeveloperToolbar/etc/adminhtml/events.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 3:1 warning Spaces must be used to indent lines; tabs are not allowed (Generic.WhiteSpace.DisallowTabIndent.TabsUsed) src/app/code/Mgt/DeveloperToolbar/registration.php 4:5 warning Direct use of $_SERVER Superglobal detected. (Magento2.Security.Superglobal.SuperglobalUsageWarning) 9:33 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) 10:33 warning Direct use of $_SERVER Superglobal detected. (Magento2.Security.Superglobal.SuperglobalUsageWarning) 23:2 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) src/app/code/Mgt/DeveloperToolbar/Controller/Adminhtml/Menu/Container.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 26:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 28:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) src/app/code/Mgt/DeveloperToolbar/Controller/Toolbar/Container.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 26:1 warning Spaces must be used to indent lines; tabs are not allowed (Generic.WhiteSpace.DisallowTabIndent.TabsUsed) 27:6 warning Expected 4 spaces before asterisk; 5 found (Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar) 28:6 warning Expected 4 spaces before asterisk; 5 found (Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar) 40:12 warning @param is not found for one or more params in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 53:6 warning Additional blank lines found at end of the annotation block (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 63:53 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage) src/app/code/Mgt/DeveloperToolbar/Controller/Feed/Update.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 36:12 warning Extra @param found in method annotation (Magento2.Annotation.MethodArguments.ExtraParam) 47:6 warning Additional blank lines found at end of the annotation block (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 48:12 warning Empty FUNCTION statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedFunction) 52:15 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 52:15 warning Empty FUNCTION statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedFunction) src/app/code/Mgt/DeveloperToolbar/view/frontend/templates/toolbar.phtml 3:12 warning The use of $this in templates is deprecated. Use $block instead. (Magento2.Templates.ThisInTemplate.FoundThis) 4:18 warning The use of $this in templates is deprecated. Use $block instead. (Magento2.Templates.ThisInTemplate.FoundThis) 10:68 warning Short echo tag syntax must be used; expected "