diff --git a/src/ServiceManager.php b/src/ServiceManager.php index 1d0b2b63..f97480ff 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -202,6 +202,7 @@ public function get(string $id): mixed // We start by checking if we have cached the requested service; // this is the fastest method. if (isset($this->services[$id])) { + /** @psalm-suppress MixedReturnStatement Yes indeed, service managers can return mixed. */ return $this->services[$id]; } @@ -217,6 +218,8 @@ public function get(string $id): mixed if ($sharedService) { $this->services[$id] = $service; } + + /** @psalm-suppress MixedReturnStatement Yes indeed, service managers can return mixed. */ return $service; } @@ -234,6 +237,8 @@ public function get(string $id): mixed // If the alias is configured as a shared service, we are done. if ($sharedAlias) { $this->services[$id] = $this->services[$resolvedName]; + + /** @psalm-suppress MixedReturnStatement Yes indeed, service managers can return mixed. */ return $this->services[$resolvedName]; } @@ -247,6 +252,7 @@ public function get(string $id): mixed $this->services[$id] = $service; } + /** @psalm-suppress MixedReturnStatement Yes indeed, service managers can return mixed. */ return $service; }