Magento Coding Standard (PHPCS) report for tnegeli/m2clitools ============================================================= Package version: 2.0.0 | Magento: 2.4.9 | Tested: 2026-11-02 2 errors, 111 warnings in 6 files Console/Command/CleanupIllegalProductMedia.php 12:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 31: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) 40:133 warning Line exceeds 120 characters; contains 133 characters (Generic.Files.LineLength.TooLong) 67:155 warning Line exceeds 120 characters; contains 155 characters (Generic.Files.LineLength.TooLong) 75:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) 84:9 warning Line exceeds 120 characters; contains 170 characters (Generic.Files.LineLength.TooLong) 92:123 warning Line exceeds 120 characters; contains 123 characters (Generic.Files.LineLength.TooLong) 93:19 warning Possible raw SQL statement 'SELECT value_id FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 93:143 warning Line exceeds 120 characters; contains 143 characters (Generic.Files.LineLength.TooLong) 100:123 warning Line exceeds 120 characters; contains 123 characters (Generic.Files.LineLength.TooLong) 101:19 warning Possible raw SQL statement 'DELETE FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 101:134 warning Line exceeds 120 characters; contains 134 characters (Generic.Files.LineLength.TooLong) 105:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Console/Command/CleanupIllegalProductMediaNonExistingFiles.php 14:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 34: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) 44:166 warning Line exceeds 120 characters; contains 166 characters (Generic.Files.LineLength.TooLong) 49:17 warning Line exceeds 120 characters; contains 156 characters (Generic.Files.LineLength.TooLong) 74:21 warning Opening parenthesis of a multi-line function call must be the last content on the line (PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket) 75:1 warning Multi-line function call not indented correctly; expected 8 spaces but found 16 (PSR2.Methods.FunctionCallSignature.Indent) 75:20 warning Closing parenthesis of a multi-line function call must be on a line by itself (PSR2.Methods.FunctionCallSignature.CloseBracketLine) 76:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 77:151 warning Line exceeds 120 characters; contains 151 characters (Generic.Files.LineLength.TooLong) 81:39 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 84:18 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 95:150 warning Line exceeds 120 characters; contains 150 characters (Generic.Files.LineLength.TooLong) 97:127 warning Line exceeds 120 characters; contains 127 characters (Generic.Files.LineLength.TooLong) 114:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) 125:9 warning Line exceeds 120 characters; contains 170 characters (Generic.Files.LineLength.TooLong) 133:19 warning Possible raw SQL statement 'SELECT value_id, value FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 141:19 warning Possible raw SQL statement 'DELETE FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 149:19 warning Possible raw SQL statement 'DELETE FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 155:123 warning Line exceeds 120 characters; contains 123 characters (Generic.Files.LineLength.TooLong) 157:19 warning Possible raw SQL statement 'DELETE FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 161:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Console/Command/CleanupIllegalProductImageMarkersNonExistingFiles.php 17:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 33:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 41: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) 83:21 warning Opening parenthesis of a multi-line function call must be the last content on the line (PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket) 84:1 warning Multi-line function call not indented correctly; expected 8 spaces but found 16 (PSR2.Methods.FunctionCallSignature.Indent) 84:20 warning Closing parenthesis of a multi-line function call must be on a line by itself (PSR2.Methods.FunctionCallSignature.CloseBracketLine) 85:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 86:151 warning Line exceeds 120 characters; contains 151 characters (Generic.Files.LineLength.TooLong) 90:33 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 91:31 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 96:121 warning Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong) 99:144 warning Line exceeds 120 characters; contains 144 characters (Generic.Files.LineLength.TooLong) 108:156 warning Line exceeds 120 characters; contains 156 characters (Generic.Files.LineLength.TooLong) 110:150 warning Line exceeds 120 characters; contains 150 characters (Generic.Files.LineLength.TooLong) 112:127 warning Line exceeds 120 characters; contains 127 characters (Generic.Files.LineLength.TooLong) 152:19 warning Possible raw SQL statement 'SELECT entity_type_id FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 157:19 warning Possible raw SQL statement 'SELECT attribute_id FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 157:170 warning Line exceeds 120 characters; contains 170 characters (Generic.Files.LineLength.TooLong) 162:19 warning Possible raw SQL statement 'SELECT value_id, value FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 163:134 warning Line exceeds 120 characters; contains 134 characters (Generic.Files.LineLength.TooLong) 176:19 warning Possible raw SQL statement 'DELETE FROM ' detected. (Magento2.SQL.RawQuery.FoundRawSql) 183:23 warning Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found) 205:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Console/Command/CleanupUnusedProductMedia.php 34: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) 48:17 warning Line exceeds 120 characters; contains 125 characters (Generic.Files.LineLength.TooLong) 69:147 warning Line exceeds 120 characters; contains 147 characters (Generic.Files.LineLength.TooLong) 89:135 warning Line exceeds 120 characters; contains 135 characters (Generic.Files.LineLength.TooLong) 90:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 98:17 warning Expected 0 spaces after opening bracket; newline found (PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace) 105:17 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 116:30 warning The use of function filesize() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 125:139 warning Line exceeds 120 characters; contains 139 characters (Generic.Files.LineLength.TooLong) 138:130 warning Line exceeds 120 characters; contains 130 characters (Generic.Files.LineLength.TooLong) Console/Command/CleanupUnusedCategoryMedia.php 16:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 36: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) 50:17 warning Line exceeds 120 characters; contains 125 characters (Generic.Files.LineLength.TooLong) 71:147 warning Line exceeds 120 characters; contains 147 characters (Generic.Files.LineLength.TooLong) 91:136 warning Line exceeds 120 characters; contains 136 characters (Generic.Files.LineLength.TooLong) 92:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 101:17 warning Expected 0 spaces after opening bracket; newline found (PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace) 108:17 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 114:13 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 117:30 warning The use of function filesize() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 126:139 warning Line exceeds 120 characters; contains 139 characters (Generic.Files.LineLength.TooLong) 138:130 warning Line exceeds 120 characters; contains 130 characters (Generic.Files.LineLength.TooLong) 155:146 warning Line exceeds 120 characters; contains 146 characters (Generic.Files.LineLength.TooLong) 156:174 warning Line exceeds 120 characters; contains 174 characters (Generic.Files.LineLength.TooLong) 158:153 warning Line exceeds 120 characters; contains 153 characters (Generic.Files.LineLength.TooLong) 167:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) Console/Command/CleanupUnusedSwatchesMedia.php 20:1 warning There must be one blank line after the last USE statement; 2 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 44: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) 60:17 warning Line exceeds 120 characters; contains 126 characters (Generic.Files.LineLength.TooLong) 67:15 warning Function's nesting level (6) exceeds 5; consider refactoring the function (Generic.Metrics.NestingLevel.TooHigh) 81:147 warning Line exceeds 120 characters; contains 147 characters (Generic.Files.LineLength.TooLong) 101:130 warning Line exceeds 120 characters; contains 130 characters (Generic.Files.LineLength.TooLong) 102:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 114:17 warning Expected 0 spaces after opening bracket; newline found (PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace) 118:17 error Identical operator === is not used for testing the return value of strpos function (Magento2.PHP.ReturnValueCheck.ImproperValueTesting) 119:17 error Identical operator === is not used for testing the return value of strpos function (Magento2.PHP.ReturnValueCheck.ImproperValueTesting) 120:17 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 126:13 warning Inline control structures are not allowed (Generic.ControlStructures.InlineControlStructure.NotAllowed) 129:30 warning The use of function filesize() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 133:141 warning Line exceeds 120 characters; contains 141 characters (Generic.Files.LineLength.TooLong) 135:139 warning Line exceeds 120 characters; contains 139 characters (Generic.Files.LineLength.TooLong) 136:153 warning Line exceeds 120 characters; contains 153 characters (Generic.Files.LineLength.TooLong) 138:147 warning Line exceeds 120 characters; contains 147 characters (Generic.Files.LineLength.TooLong) 143:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 144:38 warning The use of function filesize() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 149:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 150:38 warning The use of function filesize() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 156:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 159:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 168:151 warning Line exceeds 120 characters; contains 151 characters (Generic.Files.LineLength.TooLong) 172:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 179:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 182:25 warning The use of function is_file() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isFile() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 188:130 warning Line exceeds 120 characters; contains 130 characters (Generic.Files.LineLength.TooLong) 213:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 217:1 warning The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody)