From f4c561b090fb5dafcb02cd88208f937986a0b40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondr=CC=8Cej=20Es=CC=8Cler?= Date: Fri, 10 Jul 2020 15:38:30 +0200 Subject: [PATCH] fix phpcs --- src/ServiceContainer.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ServiceContainer.php b/src/ServiceContainer.php index 06aecd2..50ff8ef 100644 --- a/src/ServiceContainer.php +++ b/src/ServiceContainer.php @@ -70,17 +70,16 @@ public function factory(string $id): callable /** * Finds an entry of the container by its identifier and returns it. * - * @template T * @param class-string $id Identifier of the entry to look for. * - * @return mixed Entry. + * @return T * * @throws NotFoundExceptionInterface No entry was found for **this** identifier. * @throws ContainerExceptionInterface Error while retrieving the entry. * - * @return T + * @template T */ - public function get($id) // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function get($id) // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint,SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint,Generic.Files.LineLength.TooLong { if (isset($this->instances[$id])) { return $this->instances[$id]; // try load a singleton if saved @@ -137,12 +136,13 @@ public function singleton(string $id) /** * Makes a new instance of a service. Dependencies are resolved from the container. * - * @template T * @param class-string $id ID of entry we want to create new instance of * * @return T + * + * @template T */ - public function make(string $id) + public function make(string $id) // phpcs:ignore SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint,Generic.Files.LineLength.TooLong { $instance = $this->factory($id)($this);