From bb61417bc7a783a23d5d22760c32b816610e8a52 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 24 Feb 2024 14:06:17 +0100 Subject: [PATCH] CS --- proofs/each.php | 2 +- proofs/instance.php | 10 +++++----- proofs/is.php | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/proofs/each.php b/proofs/each.php index bcb6f10..f0b1607 100644 --- a/proofs/each.php +++ b/proofs/each.php @@ -67,7 +67,7 @@ static function($assert, $ints) { $assert->same( $doubles, Each::of( - Is::int()->map(static fn($i) => $i * 2) + Is::int()->map(static fn($i) => $i * 2), )($ints)->match( static fn($value) => $value, static fn() => null, diff --git a/proofs/instance.php b/proofs/instance.php index 9ae6f02..80fdcc7 100644 --- a/proofs/instance.php +++ b/proofs/instance.php @@ -9,23 +9,23 @@ 'Instance::of()', given(Set\Type::any()), static function($assert, $other) { - $std = new \stdClass; + $std = new stdClass; $assert->true( - Instance::of(\stdClass::class)->asPredicate()($std), + Instance::of(stdClass::class)->asPredicate()($std), ); $assert->same( $std, - Instance::of(\stdClass::class)($std)->match( + Instance::of(stdClass::class)($std)->match( static fn($value) => $value, static fn() => null, ), ); $assert->false( - Instance::of(\stdClass::class)->asPredicate()($other), + Instance::of(stdClass::class)->asPredicate()($other), ); $assert->same( [['$', 'Value is not an instance of stdClass']], - Instance::of(\stdClass::class)($other)->match( + Instance::of(stdClass::class)($other)->match( static fn() => null, static fn($failures) => $failures ->map(static fn($failure) => [ diff --git a/proofs/is.php b/proofs/is.php index de8fd81..a4898c0 100644 --- a/proofs/is.php +++ b/proofs/is.php @@ -16,7 +16,7 @@ true, false, null, - new \stdClass, + new stdClass, ), Set\Sequence::of(Set\Strings::any()), ), @@ -61,7 +61,7 @@ static function($assert, $string, $other) { true, false, null, - new \stdClass, + new stdClass, ), Set\Sequence::of(Set\Strings::any()), ), @@ -106,7 +106,7 @@ static function($assert, $int, $other) { true, false, null, - new \stdClass, + new stdClass, ), Set\Sequence::of(Set\Strings::any()), ), @@ -152,7 +152,7 @@ static function($assert, $float, $other) { true, false, null, - new \stdClass, + new stdClass, ), )), Set\Composite::immutable( @@ -175,7 +175,7 @@ static function($assert, $float, $other) { true, false, null, - new \stdClass, + new stdClass, ), ), ), @@ -218,7 +218,7 @@ static function($assert, $array, $other) { Set\RealNumbers::any(), Set\Elements::of( null, - new \stdClass, + new stdClass, ), Set\Sequence::of(Set\Either::any( Set\Strings::any(), @@ -228,7 +228,7 @@ static function($assert, $array, $other) { true, false, null, - new \stdClass, + new stdClass, ), )), ), @@ -272,7 +272,7 @@ static function($assert, $bool, $other) { Set\Elements::of( true, false, - new \stdClass, + new stdClass, ), Set\Sequence::of(Set\Either::any( Set\Strings::any(), @@ -282,7 +282,7 @@ static function($assert, $bool, $other) { true, false, null, - new \stdClass, + new stdClass, ), )), ), @@ -326,7 +326,7 @@ static function($assert, $other) { true, false, null, - new \stdClass, + new stdClass, ), )), Set\Composite::immutable(