Skip to content

Commit 90614c7

Browse files
authored
Merge pull request #422 from sbuerk/stefan-1
[BUGFIX] Mitigate "Using null as an array offset is deprecated"
2 parents 4663249 + 67d3309 commit 90614c7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/DocBlock/StandardTagFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ private function getArgumentsForParametersFromWiring(array $parameters, array $l
282282
}
283283

284284
$parameterName = $parameter->getName();
285-
if (isset($locator[$typeHint])) {
286-
$arguments[$parameterName] = $locator[$typeHint];
285+
if (isset($locator[$typeHint ?? ''])) {
286+
$arguments[$parameterName] = $locator[$typeHint ?? ''];
287287
continue;
288288
}
289289

tests/unit/DocBlock/StandardTagFactoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,11 @@ public function validTagProvider(): array
525525
'tag',
526526
'@tag (is valid)',
527527
],
528+
'full-qualified-class-name following a tag name is valid' => [
529+
'@tag \InvalidArgumentException',
530+
'tag',
531+
'@tag \InvalidArgumentException',
532+
],
528533
];
529534
}
530535

0 commit comments

Comments
 (0)