From 6158925b3ef893071ce1e31f9bffe382310673b0 Mon Sep 17 00:00:00 2001 From: Mehmet Korkmaz Date: Mon, 10 May 2021 12:09:20 +0300 Subject: [PATCH] class check for dependencies removed --- src/Resolver.php | 2 -- tests/unit/ResolverTest.php | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/Resolver.php b/src/Resolver.php index 5fb630f..0250b97 100644 --- a/src/Resolver.php +++ b/src/Resolver.php @@ -74,8 +74,6 @@ private static function getParamType(ReflectionParameter $parameter): array } try { - self::checkClassName($type->getName()); - return ['name' => $parameter->name, 'type' => $type->getName()]; } catch (ReflectionException $e) { throw new ClassOrMethodCouldNotBeFound($e->getMessage()); diff --git a/tests/unit/ResolverTest.php b/tests/unit/ResolverTest.php index d30e06b..5aac980 100644 --- a/tests/unit/ResolverTest.php +++ b/tests/unit/ResolverTest.php @@ -63,13 +63,4 @@ public function getTypeHintClassesShouldThrowExceptionForNonExistingMethod(): vo Selami\Stdlib\Resolver::getParameterHints(TypeHintedClass::class, 'nonExistingMethod'); } - - /** - * @test - */ - public function getTypeHintClassesShouldThrowExceptionForNonExistingClassHint(): void - { - $this->expectException(ClassOrMethodCouldNotBeFound::class); - $result = Selami\Stdlib\Resolver::getParameterHints(TypeHintedClass::class, 'method2'); - } }