Magento Coding Standard (PHPCS) report for magefan/module-translation ===================================================================== Package version: 2.8.0 | Magento: 2.4.9 | Tested: 2026-10-15 1 error, 143 warnings in 44 files Plugin/Magento/Framework/Phrase/Renderer/Translate.php 39:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 40:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Plugin/Magento/Ui/Model/Export/MetadataProvider.php 33:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 39:5 warning Visibility must be declared on method "convertToSnakeCase" (Squiz.Scope.MethodScope.Missing) 48:9 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 55:22 error Identical operator === is not used for testing the return value of strpos function (Magento2.PHP.ReturnValueCheck.ImproperValueTesting) Plugin/Backend/AbstractLegacyEditFormPlugin.php 131:15 warning Line exceeds 120 characters; contains 122 characters (Generic.Files.LineLength.TooLong) 153:16 warning The use of function htmlspecialchars() is discouraged; use \Magento\Framework\Escaper->escapeHtml() instead (Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative) Plugin/Backend/Magento/Email/Block/Adminhtml/Template/Edit/FormPlugin.php 25:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Plugin/Backend/Magento/Backend/Block/Widget/Grid/Massaction.php 61:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 72:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Model/Config.php 24:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 26:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 27: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) 31:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 36:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 37:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 39:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 117:124 warning Line exceeds 120 characters; contains 124 characters (Generic.Files.LineLength.TooLong) 170:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 171:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 187:8 warning null is not a valid PHP type (Magento2.Annotation.MethodArguments.NotValidType) Model/Translation/Source/LocaleToLanguage.php 18:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) 25:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) Model/Translation/Source/StoreView.php 19:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) 26:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) 33:8 warning Short description duplicates class property name. (Magento2.Commenting.ClassPropertyPHPDocFormatting.AlreadyHaveMeaningfulNameVar) Model/TranslatableData.php 94:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 152:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 248:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 275:127 warning Line exceeds 120 characters; contains 127 characters (Generic.Files.LineLength.TooLong) 299:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Model/Translation.php 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 17: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 Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 139:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 148:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 157:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 166:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 175:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Model/ResourceModel/Translation/Grid/Collection.php 29:8 warning $mainTable parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 29:8 warning $storeManager parameter is missing in method arguments signature (Magento2.Annotation.MethodArguments.ArgumentMissing) 30:8 warning $eventPrefix parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 30:8 warning $metadataPool parameter is missing in method arguments signature (Magento2.Annotation.MethodArguments.ArgumentMissing) 31:8 warning $eventObject parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 32:8 warning $resourceModel parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 33:8 warning $model parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 34:8 warning $connection parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 35:8 warning $resource parameter is not in order (Magento2.Annotation.MethodArguments.ParamOrder) 41:12 warning Extra @param found in method annotation (Magento2.Annotation.MethodArguments.ExtraParam) Model/EntityManager.php 101:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow) Model/Config/Backend/File.php 93:129 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 96:36 warning The use of function file_get_contents() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 101:135 warning Line exceeds 120 characters; contains 135 characters (Generic.Files.LineLength.TooLong) 102:13 warning The use of function unlink() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged) 103:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) Model/Config/Source/PhrasesLocaleSource.php 23:39 warning Opening brace must be the last content on the line (Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace) 23:78 warning Closing brace must be on a line by itself (Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore) Model/Config/Source/Locale.php 78:146 warning Line exceeds 120 characters; contains 146 characters (Generic.Files.LineLength.TooLong) Model/Config/Source/ProcessorsList.php 12:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 13:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 31:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) Model/Import/Translation/RowValidatorInterface.php 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 16:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Model/Import/Translation.php 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 17: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 Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 21:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 23:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 25:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 25:11 warning Class constants must be uppercase; expected TABLE_ENTITY but found TABLE_Entity (Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase) 27:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 60:15 warning Class properties must have type declaration using @var tag. (Magento2.Commenting.ClassPropertyPHPDocFormatting.MissingVar) 302:8 warning $priceData parameter is missing in method arguments signature (Magento2.Annotation.MethodArguments.ArgumentMissing) 306:15 warning $entityData parameter is missing in method annotation (Magento2.Annotation.MethodArguments.ArgumentMissing) 343:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Observer/Magefan/TranslationSaveAfter.php 83:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 88:12 warning Empty FUNCTION statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedFunction) Ui/Component/Listing/Column/TranslationActions.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 21:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 96:13 warning Motivation behind the added @deprecated tag MUST be explained. @see tag MUST be used with reference to new implementation when code is deprecated and there is a new alternative. (Magento2.Annotation.MethodAnnotationStructure.InvalidDeprecatedTagUsage) etc/adminhtml/routes.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) Controller/Adminhtml/Translation/Index.php 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Controller/Adminhtml/Translation/NewAction.php 14:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Controller/Adminhtml/Translation/InlineEdit.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 95:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Controller/Adminhtml/Translation/Delete.php 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Controller/Adminhtml/Translation/Edit.php 17:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Controller/Adminhtml/Translation/Save.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 109:121 warning Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong) Controller/Adminhtml/Translation/MassDelete.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) view/adminhtml/templates/cms/store-switcher-promo.phtml 14:56 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 17:70 warning Using escapeHtmlAttr on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 18:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 21:71 warning Using escapeHtmlAttr on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 22:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 25:67 warning Using escapeHtmlAttr on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 26:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 35:29 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 40:43 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 52:53 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 60:53 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) 66:49 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found) view/adminhtml/templates/add_edit_translation/auto_translation.phtml 13:54 warning ObjectManager should not be used in .phtml template. Templates must not instantiate new objects within their code. All objects must be passed from the Block object. (Magento2.Templates.ObjectManager.ObjectManagerUsageFound) view/adminhtml/templates/product_attributes/auto_translation.phtml 12:54 warning ObjectManager should not be used in .phtml template. Templates must not instantiate new objects within their code. All objects must be passed from the Block object. (Magento2.Templates.ObjectManager.ObjectManagerUsageFound) view/adminhtml/layout/translation_translation_edit.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) view/adminhtml/ui_component/translation_translation_form.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) view/adminhtml/ui_component/translation_translation_listing.xml 1:1 warning End of line character is invalid; expected "\n" but found "\r\n" (Generic.Files.LineEndings.InvalidEOLChar) Api/Data/TranslationInterface.php 15:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 17: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 Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 21:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 23:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 25:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 58:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 64:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 70:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 76:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 82:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 88:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) Block/Adminhtml/Translation/Edit/GenericButton.php 47:11 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch) Block/Adminhtml/System/Config/Form/CurrentUsage.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) Block/Adminhtml/System/Config/Form/AuthData.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 78:155 warning Line exceeds 120 characters; contains 166 characters (Generic.Files.LineLength.TooLong) 82:133 warning Line exceeds 120 characters; contains 133 characters (Generic.Files.LineLength.TooLong) Block/Adminhtml/System/Config/Form/ConfigFile.php 24:1 warning Line exceeds 120 characters; contains 175 characters (Generic.Files.LineLength.TooLong) 39:1 warning Line exceeds 120 characters; contains 132 characters (Generic.Files.LineLength.TooLong) 40:1 warning Line exceeds 120 characters; contains 142 characters (Generic.Files.LineLength.TooLong) 41:1 warning Line exceeds 120 characters; contains 141 characters (Generic.Files.LineLength.TooLong) 43:1 warning Line exceeds 120 characters; contains 139 characters (Generic.Files.LineLength.TooLong) 44:1 warning Line exceeds 120 characters; contains 199 characters (Generic.Files.LineLength.TooLong) 48:123 warning Line exceeds 120 characters; contains 123 characters (Generic.Files.LineLength.TooLong) Block/Adminhtml/System/Config/Form/Field/SkippedFieldsDynamicRow.php 24:148 warning Line exceeds 120 characters; contains 148 characters (Generic.Files.LineLength.TooLong) 31:8 warning Type is not specified (Magento2.Annotation.MethodArguments.NoTypeSpecified) 86:147 warning Line exceeds 120 characters; contains 147 characters (Generic.Files.LineLength.TooLong) Block/Adminhtml/System/Config/Form/Field/TranslatableFields.php 17:8 warning Content missing for @var tag in class property declaration. (Magento2.Commenting.ClassPropertyPHPDocFormatting.EmptyVar) Block/Adminhtml/System/Config/Form/InfoPlan.php 29:1 warning Code must not contain multiple empty lines in a row; found 2 empty lines. (Magento2.Whitespace.MultipleEmptyLines.MultipleEmptyLines) 46:250 warning Line exceeds 120 characters; contains 250 characters (Generic.Files.LineLength.TooLong) Block/Adminhtml/System/Config/Form/ScheduleSelectedSourcesButton.php 19:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)