diff --git a/.php_cs.dist b/.php_cs.dist index b2c7bb250..1adf58d62 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -10,6 +10,7 @@ return PhpCsFixer\Config::create() ->setRules([ '@Symfony' => true, 'array_syntax' => ['syntax' => 'short'], + 'final_static_access' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], diff --git a/src/OutputFormatter/ConsoleOutputFormatter.php b/src/OutputFormatter/ConsoleOutputFormatter.php index 3afb25f8a..0da6175f2 100644 --- a/src/OutputFormatter/ConsoleOutputFormatter.php +++ b/src/OutputFormatter/ConsoleOutputFormatter.php @@ -33,7 +33,7 @@ public function getName(): string public function configureOptions(): array { return [ - OutputFormatterOption::newValueOption(static::REPORT_UNCOVERED, 'report uncovered dependencies', false), + OutputFormatterOption::newValueOption(self::REPORT_UNCOVERED, 'report uncovered dependencies', false), ]; } @@ -55,7 +55,7 @@ public function finish( $this->printViolation($rule, $output); } - if (true === $outputFormatterInput->getOptionAsBoolean(static::REPORT_UNCOVERED)) { + if (true === $outputFormatterInput->getOptionAsBoolean(self::REPORT_UNCOVERED)) { $this->printUncovered($context, $output); } diff --git a/src/OutputFormatter/JUnitOutputFormatter.php b/src/OutputFormatter/JUnitOutputFormatter.php index 3bfd4b78a..e8965e5d6 100644 --- a/src/OutputFormatter/JUnitOutputFormatter.php +++ b/src/OutputFormatter/JUnitOutputFormatter.php @@ -27,7 +27,7 @@ public function getName(): string public function configureOptions(): array { return [ - OutputFormatterOption::newValueOption(static::DUMP_XML, 'path to a dumped xml file', './junit-report.xml'), + OutputFormatterOption::newValueOption(self::DUMP_XML, 'path to a dumped xml file', './junit-report.xml'), ]; } @@ -48,7 +48,7 @@ public function finish( ): void { $xml = $this->createXml($context); - if ($dumpXmlPath = $outputFormatterInput->getOption(static::DUMP_XML)) { + if ($dumpXmlPath = $outputFormatterInput->getOption(self::DUMP_XML)) { file_put_contents($dumpXmlPath, $xml); $output->writeLineFormatted('JUnit Report dumped to '.realpath($dumpXmlPath).''); }