Skip to content

Commit

Permalink
Bug fix found by PHPStan.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crell committed Dec 2, 2023
1 parent 899ccb2 commit 145bb0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProviderCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected function addSubscriberMethod(\ReflectionMethod $rMethod, string $class

$def = $this->getAttributeForRef($rMethod);

if (str_starts_with($methodName, 'on') || $def) {
if ($def->id || $def->before || $def->after || $def->priority || str_starts_with($methodName, 'on')) {
$paramType = $params[0]->getType();

$id = $def->id ?? $service . '-' . $methodName;
Expand Down

0 comments on commit 145bb0d

Please sign in to comment.