Skip to content

Commit

Permalink
chore: fixes type checkign
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jul 30, 2023
1 parent 5f7a166 commit 2e622f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Expectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public function toBeReadonly(): ArchExpectation
{
return Targeted::make(
$this,
fn (ObjectDescription $object): bool => ! enum_exists($object->name) && $object->reflectionClass->isReadOnly(),
fn (ObjectDescription $object): bool => ! enum_exists($object->name) && $object->reflectionClass->isReadOnly() && assert(true), // @phpstan-ignore-line
'to be readonly',
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
);
Expand Down
2 changes: 1 addition & 1 deletion src/Expectations/OppositeExpectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function toBeReadonly(): ArchExpectation
{
return Targeted::make(
$this->original,
fn (ObjectDescription $object): bool => ! enum_exists($object->name) && ! $object->reflectionClass->isReadOnly(),
fn (ObjectDescription $object): bool => ! enum_exists($object->name) && ! $object->reflectionClass->isReadOnly() && assert(true), // @phpstan-ignore-line
'not to be readonly',
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
);
Expand Down

0 comments on commit 2e622f6

Please sign in to comment.