From 34ce65887df3b8b1aaf79744baf503f0f67c3497 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 7 Apr 2025 12:10:25 +0200 Subject: [PATCH 1/3] Update Janus --- composer.json | 2 +- phpstan.neon | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7cb4f85..e74e223 100644 --- a/composer.json +++ b/composer.json @@ -74,4 +74,4 @@ "vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v" ] } -} +} \ No newline at end of file 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 From 64d828326bf94c7ac10b8501ca367ba94227ab95 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 7 Apr 2025 12:10:33 +0200 Subject: [PATCH 2/3] Add new method in output --- src/Console/ChainOutput.php | 44 +++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 11 deletions(-) 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(); From 78b3b3600cf6eef37253fe6693588b306a4b9337 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 7 Apr 2025 13:55:32 +0200 Subject: [PATCH 3/3] Fix CS --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e74e223..188cc48 100644 --- a/composer.json +++ b/composer.json @@ -63,15 +63,15 @@ "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", "vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v" ] } -} \ No newline at end of file +}