Skip to content

Commit

Permalink
Update exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Apr 13, 2023
1 parent 35be860 commit 235c0da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ protected function prepareModel() : static
$type = $property->getType();
if ( ! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
throw new LogicException(
'The ' . static::class
. '::$model property must have one type to be instantiated'
'Property ' . static::class
. '::$model must have a valid named type'
);
}
$name = $type->getName();
Expand Down
2 changes: 1 addition & 1 deletion tests/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function expectModelPropertyException() : void
{
$this->expectException(\LogicException::class);
$this->expectExceptionMessageMatches(
'#The (.+)::\$model property must have one type to be instantiated#'
'#Property (.+)::\$model must have a valid named type#'
);
}

Expand Down

0 comments on commit 235c0da

Please sign in to comment.