Skip to content

Commit 1d57202

Browse files
committed
Fixed phpstan errors
1 parent 5e2f1b9 commit 1d57202

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Annotations/AnnotationGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ protected function extractRawParamTypesFromDocBlock(string $docBlock): array
379379

380380
$paramTypes = [];
381381
foreach ($matches as $match) {
382-
$type = trim($match[1] ?? '');
383-
$name = trim($match[2] ?? '');
382+
$type = trim($match[1]);
383+
$name = trim($match[2]);
384384
if ($type === '' || $name === '') {
385385
continue;
386386
}
@@ -867,8 +867,8 @@ protected function getTypeAliasesFromClassDocBlock(\ReflectionClass $reflectionC
867867
preg_match_all('/@phpstan-type\s+([A-Za-z_][A-Za-z0-9_]*)\s+([^\n\r*]+)/', $docBlock, $matches, PREG_SET_ORDER);
868868
$aliases = [];
869869
foreach ($matches as $match) {
870-
$aliasName = trim($match[1] ?? '');
871-
$aliasType = trim($match[2] ?? '');
870+
$aliasName = trim($match[1]);
871+
$aliasType = trim($match[2]);
872872
if ($aliasName === '' || $aliasType === '') {
873873
continue;
874874
}

0 commit comments

Comments
 (0)