From 337c603665b3a146f2380d8b8cda086e2cb895de Mon Sep 17 00:00:00 2001 From: Marco Rieger Date: Tue, 24 Feb 2015 01:31:39 +0100 Subject: [PATCH 1/3] reflect correct return type from method --- module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php b/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php index 5486cb6d..a04f2467 100644 --- a/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php +++ b/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php @@ -221,7 +221,7 @@ public function testListUserModulesDoesNotListModulesFromApiNotFoundInDatabase() ->expects($this->once()) ->method('findByUrl') ->with($this->equalTo($repository->html_url)) - ->willReturn(null) + ->willReturn(false) ; $currentUserService = $this->getMockBuilder(Api\CurrentUser::class)->getMock(); From 3a1b424e3a21ee3abfbc644f881924fb8504e009 Mon Sep 17 00:00:00 2001 From: Marco Rieger Date: Tue, 24 Feb 2015 01:32:47 +0100 Subject: [PATCH 2/3] reflect correct return type from method --- module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php b/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php index a04f2467..c1d20f88 100644 --- a/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php +++ b/module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php @@ -381,7 +381,7 @@ public function testRegisterInsertsModule() ->expects($this->once()) ->method('findByUrl') ->with($this->equalTo($repository->html_url)) - ->willReturn(null) + ->willReturn(false) ; $moduleMapper From b9fde452637bd32729fbf6c1d23e42952260e250 Mon Sep 17 00:00:00 2001 From: Marco Rieger Date: Tue, 24 Feb 2015 01:33:37 +0100 Subject: [PATCH 3/3] added correct type comparison --- module/ZfModule/src/ZfModule/Service/Module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ZfModule/src/ZfModule/Service/Module.php b/module/ZfModule/src/ZfModule/Service/Module.php index f115a17b..7573d89a 100644 --- a/module/ZfModule/src/ZfModule/Service/Module.php +++ b/module/ZfModule/src/ZfModule/Service/Module.php @@ -131,7 +131,7 @@ public function currentUserModules() return false; } - if (null === $this->moduleMapper->findByUrl($repository->html_url)) { + if (false === $this->moduleMapper->findByUrl($repository->html_url)) { return false; }