Skip to content

Commit 2340e43

Browse files
Update dependency phpstan/phpstan to v2.1.51 (#1904)
* Update dependency phpstan/phpstan to v2.1.51 * Avoid redundant Description assertion in PhpEnumType --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
1 parent 8405df9 commit 2340e43

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"nyholm/psr7": "^1.5",
2424
"phpbench/phpbench": "^1.2",
2525
"phpstan/extension-installer": "^1.1",
26-
"phpstan/phpstan": "2.1.50",
26+
"phpstan/phpstan": "2.1.51",
2727
"phpstan/phpstan-phpunit": "2.0.16",
2828
"phpstan/phpstan-strict-rules": "2.0.10",
2929
"phpunit/phpunit": "^9.5 || ^10.5.21 || ^11",

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)