diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index a7b9f3f8488e4..e2442b229eb06 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -199,13 +199,11 @@ private function getFullWhitelist() public function testCodeStyle() { - $whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1' - ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']); - + $isFullScan = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1'; $reportFile = self::$reportDir . '/phpcs_report.txt'; $codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper()); - $result = $codeSniffer->run($whiteList); - $report = file_exists($reportFile) ? file_get_contents($reportFile) : ''; + $result = $codeSniffer->run($isFullScan ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml'])); + $report = file_get_contents($reportFile); $this->assertEquals( 0, $result,