diff --git a/composer.json b/composer.json index 7cb4f85..188cc48 100644 --- a/composer.json +++ b/composer.json @@ -63,11 +63,11 @@ "scripts": { "fix-lint": [ "@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --ansi", - "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" + "PHP_CS_FIXER_IGNORE_ENV=1 vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" ], "lint": [ "@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --dry-run --ansi", - "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" + "PHP_CS_FIXER_IGNORE_ENV=1 vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" ], "test": [ "simple-phpunit", diff --git a/phpstan.neon b/phpstan.neon index 7b95bf7..c97c69f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,8 @@ includes: - vendor/21torr/janus/phpstan/lib.neon +# If you use simple-phpunit, you need to uncomment the following line. +# Always make sure to first run simple-phpunit and then PHPStan. parameters: bootstrapFiles: - vendor/bin/.phpunit/phpunit/vendor/autoload.php diff --git a/src/Console/ChainOutput.php b/src/Console/ChainOutput.php index 7a3b5da..d2db651 100644 --- a/src/Console/ChainOutput.php +++ b/src/Console/ChainOutput.php @@ -25,8 +25,9 @@ public function __construct ( } /** - * @inheritDoc + * */ + #[\Override] public function write (iterable|string $messages, bool $newline = false, int $options = 0) : void { $this->bufferedOutput->write($messages, $newline, $options); @@ -34,8 +35,9 @@ public function write (iterable|string $messages, bool $newline = false, int $op } /** - * @inheritDoc + * */ + #[\Override] public function writeln (iterable|string $messages, int $options = 0) : void { $this->bufferedOutput->writeln($messages, $options); @@ -43,8 +45,9 @@ public function writeln (iterable|string $messages, int $options = 0) : void } /** - * @inheritDoc + * */ + #[\Override] public function setVerbosity (int $level) : void { $this->bufferedOutput->setVerbosity($level); @@ -52,48 +55,62 @@ public function setVerbosity (int $level) : void } /** - * @inheritDoc + * */ + #[\Override] public function getVerbosity () : int { return $this->bufferedOutput->getVerbosity(); } /** - * @inheritDoc + * */ + #[\Override] public function isQuiet () : bool { return $this->bufferedOutput->isQuiet(); } /** - * @inheritDoc + * */ + #[\Override] public function isVerbose () : bool { return $this->bufferedOutput->isVerbose(); } /** - * @inheritDoc + * */ + #[\Override] public function isVeryVerbose () : bool { return $this->bufferedOutput->isVeryVerbose(); } /** - * @inheritDoc + * */ + #[\Override] public function isDebug () : bool { return $this->bufferedOutput->isDebug(); } /** - * @inheritDoc + * + */ + public function isSilent() : bool + { + return $this->bufferedOutput->isSilent(); + } + + /** + * */ + #[\Override] public function setDecorated (bool $decorated) : void { $this->bufferedOutput->setDecorated(true); @@ -101,13 +118,17 @@ public function setDecorated (bool $decorated) : void } /** - * @inheritDoc + * */ + #[\Override] public function isDecorated () : bool { return $this->bufferedOutput->isDecorated(); } + /** + * + */ public function setFormatter (OutputFormatterInterface $formatter) : void { $this->bufferedOutput->setFormatter($formatter); @@ -115,8 +136,9 @@ public function setFormatter (OutputFormatterInterface $formatter) : void } /** - * @inheritDoc + * */ + #[\Override] public function getFormatter () : OutputFormatterInterface { return $this->bufferedOutput->getFormatter();