Skip to content

Commit 235c0da

Browse files
committed
Update exception message
1 parent 35be860 commit 235c0da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Controller.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ protected function prepareModel() : static
6363
$type = $property->getType();
6464
if ( ! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
6565
throw new LogicException(
66-
'The ' . static::class
67-
. '::$model property must have one type to be instantiated'
66+
'Property ' . static::class
67+
. '::$model must have a valid named type'
6868
);
6969
}
7070
$name = $type->getName();

tests/ControllerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function expectModelPropertyException() : void
4343
{
4444
$this->expectException(\LogicException::class);
4545
$this->expectExceptionMessageMatches(
46-
'#The (.+)::\$model property must have one type to be instantiated#'
46+
'#Property (.+)::\$model must have a valid named type#'
4747
);
4848
}
4949

0 commit comments

Comments
 (0)