From df42b9ed7b0b247018347c3c9f40775bd75e909c Mon Sep 17 00:00:00 2001 From: nuno maduro Date: Mon, 6 Jul 2026 13:17:11 +0100 Subject: [PATCH] chore: style --- rector.php | 4 ++++ src/Expectation.php | 2 +- src/Plugins/Tia.php | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rector.php b/rector.php index caec3188..a5c426f5 100644 --- a/rector.php +++ b/rector.php @@ -4,7 +4,9 @@ declare(strict_types=1); use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector; use Rector\Config\RectorConfig; +use Rector\DeadCode\Rector\ClassMethod\RemoveDuplicatedReturnSelfDocblockRector; use Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector; +use Rector\DeadCode\Rector\ClassMethod\RemoveUselessUnionReturnDocblockRector; use Rector\TypeDeclaration\Rector\ClassMethod\NarrowObjectReturnTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector; @@ -18,6 +20,8 @@ return RectorConfig::configure() ArrowFunctionDelegatingCallToFirstClassCallableRector::class, NarrowObjectReturnTypeRector::class, RemoveParentDelegatingConstructorRector::class, + RemoveDuplicatedReturnSelfDocblockRector::class, + RemoveUselessUnionReturnDocblockRector::class, ]) ->withPreparedSets( deadCode: true, diff --git a/src/Expectation.php b/src/Expectation.php index b8c0862a..9dae7bdb 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -130,7 +130,7 @@ final class Expectation if (getenv('PARATEST') !== false || isset($_SERVER['COLLISION_PRINTER'])) { ob_start(); var_dump($this->value, ...$arguments); - $output = (string) ob_get_clean(); + $output = ob_get_clean(); throw new ExpectationFailedException($output); } diff --git a/src/Plugins/Tia.php b/src/Plugins/Tia.php index ef6c083a..23ad44fa 100644 --- a/src/Plugins/Tia.php +++ b/src/Plugins/Tia.php @@ -219,8 +219,11 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable if (! $watchPatterns->isEnabled()) { return false; } + if (! $watchPatterns->isLocally()) { + return true; + } - return ! ($watchPatterns->isLocally() && self::argumentPresent('--ci', $arguments)); + return ! self::argumentPresent('--ci', $arguments); } /**