Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Feb 24, 2024
1 parent 70dd2fd commit bb61417
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion proofs/each.php
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions proofs/instance.php
Expand Up @@ -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) => [
Expand Down
20 changes: 10 additions & 10 deletions proofs/is.php
Expand Up @@ -16,7 +16,7 @@
true,
false,
null,
new \stdClass,
new stdClass,
),
Set\Sequence::of(Set\Strings::any()),
),
Expand Down Expand Up @@ -61,7 +61,7 @@ static function($assert, $string, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
Set\Sequence::of(Set\Strings::any()),
),
Expand Down Expand Up @@ -106,7 +106,7 @@ static function($assert, $int, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
Set\Sequence::of(Set\Strings::any()),
),
Expand Down Expand Up @@ -152,7 +152,7 @@ static function($assert, $float, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
)),
Set\Composite::immutable(
Expand All @@ -175,7 +175,7 @@ static function($assert, $float, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
),
),
Expand Down Expand Up @@ -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(),
Expand All @@ -228,7 +228,7 @@ static function($assert, $array, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
)),
),
Expand Down Expand Up @@ -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(),
Expand All @@ -282,7 +282,7 @@ static function($assert, $bool, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
)),
),
Expand Down Expand Up @@ -326,7 +326,7 @@ static function($assert, $other) {
true,
false,
null,
new \stdClass,
new stdClass,
),
)),
Set\Composite::immutable(
Expand Down

0 comments on commit bb61417

Please sign in to comment.