Magento Coding Standard (PHPCS) report for morpara/morpos-magento2
==================================================================
Package version: 1.0.0 | Magento: 2.4.9 | Tested: 2026-05-26
3 errors, 108 warnings in 30 files
Gateway/Response/InitializeResponseHandler.php
21:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
52:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
Gateway/Command/InitializeCommand.php
29:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
129:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
Gateway/Http/TransferFactory.php
22:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
Gateway/Config/Config.php
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)
28:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
Gateway/Validator/ResponseValidator.php
21:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
Helper/Signature.php
28:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
75:26 warning The use of function base64_decode() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)
113:20 warning The use of function base64_decode() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)
Helper/Data.php
32: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 Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
34:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
35: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)
38: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)
40:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
Helper/Currency.php
27:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
Model/Service/PaymentFailuresHandler.php
73:30 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage)
75:68 warning Use ::class notation instead. (Magento2.PHP.LiteralNamespaces.LiteralClassUsage)
Model/Service/VersionCompatibility.php
24: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:15 warning Empty CATCH statement detected (Magento2.CodeAnalysis.EmptyBlock.DetectedCatch)
Model/ConversationRepository.php
25:1 warning Class description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
Model/Adapter/MorposClient.php
27:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
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)
33:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
34:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
216:86 warning There must be exactly one blank line between lines short and long descriptions (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)
235:62 error The use of function md5() is forbidden; use improved hash functions (SHA-256, SHA-512 etc.)() instead (Magento2.Security.InsecureFunction.FoundWithAlternative)
442:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
450:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
472:11 warning Exceptions must not be handled in the same function where they are thrown. (Magento2.Exceptions.ThrowCatch.ThrowCatch)
Model/Ui/ConfigProvider.php
27: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)
37:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
112:30 warning The use of function parse_url() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)
112:81 warning The use of function parse_url() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)
112:125 warning Line exceeds 120 characters; contains 125 characters (Generic.Files.LineLength.TooLong)
Model/Config/Source/FormType.php
24: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)
Setup/InstallSchema.php
1:1 error InstallSchema scripts are obsolete. Please use declarative schema approach in module's etc/db_schema.xml file (Magento2.Legacy.InstallUpgrade.ObsoleteInstallSchemaScript)
Controller/Payment/Callback.php
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)
758:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
771:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
789:13 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
Controller/Payment/Proxy.php
135:17 warning The use of function base64_decode() is discouraged (Magento2.Functions.DiscouragedFunction.Discouraged)
Controller/Payment/Initialize.php
100:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
112:17 warning Direct throw of generic Exception is discouraged. Use context specific instead. (Magento2.Exceptions.DirectThrow.FoundDirectThrow)
152:11 warning Exceptions must not be handled in the same function where they are thrown. (Magento2.Exceptions.ThrowCatch.ThrowCatch)
Controller/Payment/AbstractCsrfAwareAction.php
58:14 warning Duplicate class name "MorPOS\PaymentGateway\Controller\Payment\AbstractCsrfAwareAction" found; first defined in /data/vendor/morpara/morpos-magento2/Controller/Payment/AbstractCsrfAwareAction.php on line 29 (Generic.Classes.DuplicateClassName.Found)
58:14 error Each class must be in a file by itself (PSR1.Classes.ClassDeclaration.MultipleClasses)
Controller/Adminhtml/System/Config/TestConnection.php
28:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
view/frontend/templates/payment/result.phtml
26:20 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
108:53 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
109:47 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
112:51 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
113:7 warning Line indented incorrectly; expected at least 8 spaces, found 6 (Generic.WhiteSpace.ScopeIndent.Incorrect)
114:48 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
116:47 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
120:19 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
view/frontend/templates/info/default.phtml
18:21 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
19:21 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
22:21 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
23:27 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
view/frontend/web/template/payment/morpos-hosted.html
1:1 warning Avoid using closing slash with void tags, this can lead to unexpected behavior - "" (Magento2.Html.HtmlClosingVoidTags.HtmlClosingVoidElements)
view/frontend/web/template/payment/morpos-embedded.html
1:1 warning Avoid using closing slash with void tags, this can lead to unexpected behavior - "" (Magento2.Html.HtmlClosingVoidTags.HtmlClosingVoidElements)
view/adminhtml/templates/system/config/test_connection.phtml
15:1 warning Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong)
43:1 warning Line exceeds 120 characters; contains 145 characters (Generic.Files.LineLength.TooLong)
55:31 warning Using escapeUrl on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
92:1 warning Line exceeds 120 characters; contains 130 characters (Generic.Files.LineLength.TooLong)
view/adminhtml/templates/info/default.phtml
25:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
26:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
31:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
32:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
38:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
39:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
45:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
46:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
52:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
53:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
59:33 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
60:39 warning Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper (Magento2.Legacy.EscapeMethodsOnBlockClass.Found)
Api/ConversationRepositoryInterface.php
23:1 warning Interface description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
Api/Data/ConversationInterface.php
18:1 warning Interface description must contain meaningful information beyond what its name provides or be removed. (Magento2.Commenting.ClassAndInterfacePHPDocFormatting.InvalidDescription)
23:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
24: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)
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)
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)
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)
33:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
34: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)
40:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
41:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound)
Block/Payment/Result.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)
49:12 warning Possible useless method overriding detected (Generic.CodeAnalysis.UselessOverridingMethod.Found)
Block/Adminhtml/System/Config/TestConnection.php
81:80 warning There must be exactly one blank line between lines short and long descriptions (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation)