PHPUnit 10.5.45 by Sebastian Bergmann and contributors. Runtime: PHP 8.4.1 Configuration: /var/www/html/dev/tests/static/phpunit.xml FFS... 6 / 6 (100%) Time: 00:03.495, Memory: 22.00 MB There were 2 failures: 1) Magento\Test\Php\LiveCodeTest::testCodeStyle PHP Code Sniffer detected 1 violation(s): FILE: /var/www/html/app/code/Magento/Checkout/Controller/Cart/AddToCartLinkV1.php -------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES -------------------------------------------------------------------------------------------------------- 36 | WARNING | Visibility must be declared on all constants if your project supports PHP 7.1 or later 48 | WARNING | Method arguments visual alignment must be consistent 72 | WARNING | There must be exactly one blank line between lines short and long descriptions 76 | WARNING | Function's nesting level (6) exceeds 5; consider refactoring the function 115 | WARNING | Code must not contain multiple empty lines in a row; found 2 empty lines. 148 | WARNING | Line exceeds 120 characters; contains 122 characters 177 | WARNING | Line exceeds 120 characters; contains 124 characters 181 | WARNING | Code must not contain multiple empty lines in a row; found 2 empty lines. 220 | WARNING | Empty ELSE statement detected 270 | WARNING | Line exceeds 120 characters; contains 127 characters 274 | WARNING | Line exceeds 120 characters; contains 145 characters -------------------------------------------------------------------------------------------------------- Failed asserting that 1 matches expected 0. /var/www/html/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php:257 2) Magento\Test\Php\LiveCodeTest::testCodeMess PHP Code Mess has found error(s): /var/www/html/app/code/Magento/Checkout/Controller/Cart/AddToCartLinkV1.php:76 CyclomaticComplexity The method execute() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10. /var/www/html/app/code/Magento/Checkout/Controller/Cart/AddToCartLinkV1.php:76 NPathComplexity The method execute() has an NPath complexity of 2048. The configured NPath complexity threshold is 200. /var/www/html/app/code/Magento/Checkout/Controller/Cart/AddToCartLinkV1.php:76 ExcessiveMethodLength The method execute() has 160 lines of code. Current threshold is set to 100. Avoid really long methods. Failed asserting that two objects are equal. --- Expected +++ Actual @@ @@ PHPMD\TextUI\ExitCode Object ( - 'name' => 'Success' - 'value' => 0 + 'name' => 'Violation' + 'value' => 2 ) /var/www/html/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php:294 FAILURES! Tests: 6, Assertions: 5, Failures: 2, Skipped: 1.