From f57e4e0169cc1d66ee78d8d3f5ca529bd230dc94 Mon Sep 17 00:00:00 2001 From: devanych Date: Sun, 6 Sep 2020 13:29:01 +0300 Subject: [PATCH] Fix psalm config move from psalm.xml to docBlock --- psalm.xml | 7 ------- src/Container.php | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/psalm.xml b/psalm.xml index 44e9456..75bbb1e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -12,11 +12,4 @@ - - - - - - - diff --git a/src/Container.php b/src/Container.php index 0288040..33c4935 100644 --- a/src/Container.php +++ b/src/Container.php @@ -32,7 +32,7 @@ final class Container implements ContainerInterface private array $instances = []; /** - * @param array $definitions + * @param array $definitions */ public function __construct(array $definitions = []) { @@ -57,7 +57,8 @@ public function set(string $id, $definition): void /** * Sets multiple definitions at once. * - * @param array $definitions + * @param array $definitions + * @psalm-suppress MixedAssignment */ public function setMultiple(array $definitions): void { @@ -134,6 +135,7 @@ public function has($id): bool * @return mixed * @throws NotFoundException If not found definition in the container. * @throws ContainerException If unable to create instance. + * @psalm-suppress MixedArgument */ private function createInstance(string $id) { @@ -162,6 +164,7 @@ private function createInstance(string $id) * @param string $className * @return object * @throws ContainerException If unable to create object. + * @psalm-suppress ArgumentTypeCoercion */ private function createObject(string $className): object { @@ -194,6 +197,7 @@ private function createObject(string $className): object * @param ReflectionClass $reflection * @return object * @throws ContainerException If unable to create object. + * @psalm-suppress MixedAssignment */ private function getObjectFromReflection(ReflectionClass $reflection): object {