Magento Coding Standard (PHPCS) report for web-atypique/log-archiver ==================================================================== Package version: 1.0.3 | Magento: 2.4.9 | Tested: 2026-06-02 71 warnings in 4 files Helper/Data.php 10:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 12:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 15:21 warning Only one argument is allowed per line in a multi-line function call (PSR2.Methods.FunctionCallSignature.MultipleArguments) 19:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 24:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Model/Archive.php 12:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 14:29 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 15:20 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 16:31 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 18:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 23: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) 29:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 31:9 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 31:9 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 31:45 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 40:13 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 40:13 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 40:37 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 45:17 warning Expected "foreach (...) {\n"; found "foreach (...){\n" (PEAR.ControlStructures.ControlSignature.Found) 45:49 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 49:21 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 49:21 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 49:25 warning The use of function file_exists() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 49:47 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 59:21 warning The use of function copy() is discouraged; use Magento\Framework\Filesystem\DriverInterface::copy() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 63:21 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 63:21 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 63:32 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 75:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 80:23 warning The use of function gzopen() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 81:26 warning The use of function fopen() is discouraged; use Magento\Framework\Filesystem\DriverInterface::fileOpen() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 81:39 warning No space found after comma in argument list (Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma) 82:17 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 82:25 warning The use of function feof() is discouraged; use Magento\Framework\Filesystem\DriverInterface::endOfFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 83:21 warning The use of function gzwrite() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 83:38 warning The use of function fread() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 84:17 warning The use of function fclose() is discouraged; use Magento\Framework\Filesystem\DriverInterface::fileClose() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 88:13 warning The use of function gzclose() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 92:9 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 94:9 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 94:9 warning Expected 1 space after ELSE keyword; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 98:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 101:13 warning The use of function unlink() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 105:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 107:9 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 107:9 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 107:13 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 107:28 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 108:13 warning The use of function mkdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::createDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 112:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 114:19 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 115:20 warning The use of function scandir() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 116:9 warning Expected "foreach (...) {\n"; found "foreach (...){\n" (PEAR.ControlStructures.ControlSignature.Found) 116:35 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 117:13 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 117:13 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 117:16 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 117:46 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 124:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Console/Command/ArchiveLogs.php 14:23 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 15:20 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 17:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 22: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) 41:15 warning Missing @param for argument in method annotation (Magento2.Annotation.MethodArguments.ParamMissing) 43:9 warning Expected "if (...) {\n"; found "if(...){\n" (PEAR.ControlStructures.ControlSignature.Found) 43:9 warning Expected 1 space after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 43:45 warning Expected 1 space after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) Cron/ArchiveLogsCronjob.php 4:1 warning There must be one blank line after the namespace declaration (PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter) 11:23 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 13:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 16: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)