Magento Coding Standard (PHPCS) report for mageplaza/module-geoip ================================================================= Package version: 4.0.4 | Magento: 2.4.9 | Tested: 2026-11-07 67 warnings in 10 files Helper/Data.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 28:4 warning Tag @package MUST NOT be used. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.ForbiddenTags) 30:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription) 32:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 52:8 warning null is not a valid PHP type (Magento2.Annotation.MethodArguments.NotValidType) 60:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) Helper/Address.php 38:4 warning Tag @package MUST NOT be used. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.ForbiddenTags) 40:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription) 45:15 warning Class properties must have type declaration using @var tag. (Magento2.Commenting.ClassPropertyPHPDocFormatting.MissingVar) 50:15 warning Class properties must have type declaration using @var tag. (Magento2.Commenting.ClassPropertyPHPDocFormatting.MissingVar) 55:15 warning Class properties must have type declaration using @var tag. (Magento2.Commenting.ClassPropertyPHPDocFormatting.MissingVar) 127:14 warning The use of function file_exists() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 131:21 warning The use of function scandir() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 133:14 warning The use of function file_exists() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 141:8 warning null is not a valid PHP type (Magento2.Annotation.MethodArguments.NotValidType) 156:8 warning null is not a valid PHP type (Magento2.Annotation.MethodArguments.NotValidType) etc/adminhtml/routes.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) etc/adminhtml/system.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) etc/module.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) etc/acl.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) registration.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) Controller/Adminhtml/System/Config/Geoip.php 37:14 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 38:14 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 39:14 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 43:4 warning Tag @package MUST NOT be used. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.ForbiddenTags) 45:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription) 47:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 102:18 warning The use of function file_exists() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 103:17 warning The use of function mkdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::createDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 106:22 warning The use of function dirname() is discouraged; use Magento\Framework\Filesystem\DriverInterface::getParentDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 107:13 warning The use of function mkdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::createDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 110:13 warning The use of function file_put_contents() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 110:41 warning The use of function fopen() is discouraged; use Magento\Framework\Filesystem\DriverInterface::fileOpen() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 118:114 warning Expected 0 spaces before closing parenthesis; 1 found (PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket) 120:36 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 133:20 warning The use of function scandir() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 135:14 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 136:13 warning The use of function mkdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::createDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 138:14 warning The use of function rename() is discouraged; use Magento\Framework\Filesystem\DriverInterface::rename() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 143:16 warning The use of function file_exists() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 145:22 warning The use of function scandir() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 149:17 warning The use of function unlink() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 151:13 warning The use of function rmdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::deleteDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 157:18 warning The use of function scandir() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 162:17 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 162:35 warning The use of function is_link() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 165:17 warning The use of function unlink() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 168:9 warning The use of function rmdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::deleteDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 179:52 warning The use of function file_get_contents() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 181:13 warning The use of function unlink() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 196:39 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 196:39 warning The use of function stream_get_wrappers() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 198:13 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 198:13 warning The use of function stream_wrapper_restore() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 202:35 warning The use of function realpath() is discouraged; use Magento\Framework\Filesystem\DriverInterface::getRealPath() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 206:62 warning The use of function basename() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 211:27 warning The use of function basename() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 211:36 warning The use of function dirname() is discouraged; use Magento\Framework\Filesystem\DriverInterface::getParentDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 216:22 warning The use of function is_dir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::isDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 217:21 warning The use of function mkdir() is discouraged; use Magento\Framework\Filesystem\DriverInterface::createDirectory() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 219:22 warning The use of function copy() is discouraged; use Magento\Framework\Filesystem\DriverInterface::copy() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) 227:17 warning The code must be wrapped with a try block if the method uses system resources. (Magento2.Exceptions.TryProcessSystemResources.MissingTryCatch) 227:17 warning The use of function stream_wrapper_unregister() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) view/adminhtml/templates/system/config/geoip.phtml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) Block/Adminhtml/System/Config/Geoip.php 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) 34:4 warning Tag @package MUST NOT be used. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.ForbiddenTags) 36:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)