diff --git a/src/Adapters/Symfony/Component/Process/Process.php b/src/Adapters/Symfony/Component/Process/Process.php index 909944557..0636f7353 100644 --- a/src/Adapters/Symfony/Component/Process/Process.php +++ b/src/Adapters/Symfony/Component/Process/Process.php @@ -7,6 +7,9 @@ class Process extends SymfonyProcess { + /** + * @var array + */ private $options = []; /** * @param string[] $command @@ -47,12 +50,17 @@ public function getStartTime(): float return $startTime; } + /** + * @param string $name + * @param array $arguments + * @return void + */ public function __call(string $name, array $arguments) { if ($name === 'setOptions') { $this->options = $arguments[0] ?? []; - return; } + return; } public function __destruct() diff --git a/src/Events/Dispatcher.php b/src/Events/Dispatcher.php index fbbd214b3..cadfad696 100644 --- a/src/Events/Dispatcher.php +++ b/src/Events/Dispatcher.php @@ -94,6 +94,7 @@ public static function dispatch(string $name, mixed $origin = null, array $conte } $event = new Event($name, $context, $origin); + try { $dispatchMethodReflection = new \ReflectionMethod($eventDispatcher, 'dispatch'); $firstParameterReflection = $dispatchMethodReflection->getParameters()[0] ?? null; @@ -102,7 +103,7 @@ public static function dispatch(string $name, mixed $origin = null, array $conte return $eventDispatcher->dispatch($event, $name); } - return $eventDispatcher->dispatch($name, $event); + return $eventDispatcher->dispatch($name, $event); //@phpstan-ignore-line } catch (\ReflectionException $e) { return null; }