Magento Coding Standard (PHPCS) report for espertomagento/cash-on-delivery-fee ============================================================================== Package version: 1.0.3 | Magento: 2.4.9 | Tested: 2026-05-27 2 errors, 77 warnings in 16 files Service/V1/PaymentInformationManagement.php 28:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Service/V1/GuestPaymentInformationManagement.php 28:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Plugin/Payment/Model/ChecksTotalMinMax.php 11:4 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 12:4 warning Line exceeds 120 characters; contains 129 characters (Generic.Files.LineLength.TooLong) 17:5 warning Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 18:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 18:8 warning Tags visual alignment must be consistent (Magento2.Annotation.MethodAnnotationStructure.MethodArguments) 26:40 warning The first parameter of a multi-line function declaration must be on the line after the opening bracket (Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing) 27:1 warning Multi-line function declaration not indented correctly; expected 8 spaces but found 39 (Squiz.Functions.MultiLineFunctionDeclaration.Indent) 28:1 warning Multi-line function declaration not indented correctly; expected 8 spaces but found 39 (Squiz.Functions.MultiLineFunctionDeclaration.Indent) 29:1 warning Multi-line function declaration not indented correctly; expected 8 spaces but found 39 (Squiz.Functions.MultiLineFunctionDeclaration.Indent) 29:52 warning The closing parenthesis of a multi-line function declaration must be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine) 30: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) 33:9 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 35:79 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 41:13 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 41:99 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 46:11 warning Expected "} else {\n"; found "} else\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 46:11 warning Expected 1 space after ELSE keyword; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 51:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) Plugin/Quote/CashOnDeliveryFeeToOrder.php 17:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 22:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Plugin/CheckoutAgreements/Model/AgreementsValidator.php 7:13 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 9:5 warning Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 10:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 10:8 warning Tags visual alignment must be consistent (Magento2.Annotation.MethodAnnotationStructure.MethodArguments) 18:131 warning Line exceeds 120 characters; contains 131 characters (Generic.Files.LineLength.TooLong) 20:9 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 20:36 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 23:9 warning Expected 1 space after closing brace; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace) 24:9 warning Expected "} else {\n"; found "}\n else\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 24:9 warning Expected 1 space after ELSE keyword; newline found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword) 30:5 warning Missing short description (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 31:8 warning There must be exactly one blank line before tags (Magento2.Annotation.MethodAnnotationStructure.MethodAnnotation) 39:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) Plugin/Order/SaveCashOnDeliveryFee.php 16:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 21:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Plugin/Order/AddCashOnDeliveryFeeToTotalsBlock.php 13:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Plugin/Order/LoadCashOnDeliveryFeeOnCollection.php 16:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 21:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Plugin/Order/LoadCashOnDeliveryFee.php 15:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 20:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Model/Order/CashOnDeliveryFeeExtensionManagement.php 18:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 23:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 33:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 43:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 53:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Model/Total/Invoice/CashOnDeliveryFee.php 19:121 warning Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong) 21:9 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 21:35 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) Model/Total/Creditmemo/CashOnDeliveryFee.php 19:124 warning Line exceeds 120 characters; contains 124 characters (Generic.Files.LineLength.TooLong) 21:9 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 21:35 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) Model/Total/CashOnDeliveryFee.php 16:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 18: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) 22:5 warning Visibility must be declared on all constants if your project supports PHP 7.1 or later (PSR12.Properties.ConstantVisibility.NotFound) 28:13 warning Missing PHP DocBlock for class property. (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing) 30:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 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) 40:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 65:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 82:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 84:34 warning Constants are not allowed as the first argument of translation function, use string literal instead (Magento2.Translation.ConstantUsage.VariableTranslation) 87:13 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 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) 13:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) 23:12 warning Comment block is missing (Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock) Setup/UpgradeSchema.php 1:1 error UpgradeSchema scripts are obsolete. Please use declarative schema approach in module's etc/db_schema.xml file (Magento2.Legacy.InstallUpgrade.ObsoleteUpgradeSchemaScript) 20:9 warning Expected "if (...) {\n"; found "if (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 20:66 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 22:13 warning Expected "foreach (...) {\n"; found "foreach (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 22:70 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 24:17 warning Expected "foreach (...) {\n"; found "foreach (...)\n {\n" (PEAR.ControlStructures.ControlSignature.Found) 25:135 warning Line exceeds 120 characters; contains 135 characters (Generic.Files.LineLength.TooLong) 25:135 warning Expected 1 space after closing parenthesis; found newline (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis) 41:1 warning Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound) registration.php 2:1 warning There must be one blank line after the last USE statement; 0 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse)