Skip to content

Commit 29a507b

Browse files
committed
Avoid redundant Description assertion in PhpEnumType
1 parent 073d294 commit 29a507b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/Type/Definition/PhpEnumType.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,7 @@ protected function extractDescription(\ReflectionClassConstant|\ReflectionClass
108108
$attributes = $reflection->getAttributes(Description::class);
109109

110110
if (count($attributes) === 1) {
111-
$description = $attributes[0]->newInstance();
112-
assert($description instanceof Description);
113-
114-
return $description->description;
111+
return $attributes[0]->newInstance()->description;
115112
}
116113

117114
if (count($attributes) > 1) {

0 commit comments

Comments
 (0)