Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit 8c55276

Browse files
committed
Merge pull request #416 from ins0/fix/415
Hotfix: Added correct type comparison
2 parents 3b7b277 + b9fde45 commit 8c55276

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

module/ZfModule/src/ZfModule/Service/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function currentUserModules()
131131
return false;
132132
}
133133

134-
if (null === $this->moduleMapper->findByUrl($repository->html_url)) {
134+
if (false === $this->moduleMapper->findByUrl($repository->html_url)) {
135135
return false;
136136
}
137137

module/ZfModule/test/ZfModuleTest/Service/ModuleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function testListUserModulesDoesNotListModulesFromApiNotFoundInDatabase()
221221
->expects($this->once())
222222
->method('findByUrl')
223223
->with($this->equalTo($repository->html_url))
224-
->willReturn(null)
224+
->willReturn(false)
225225
;
226226

227227
$currentUserService = $this->getMockBuilder(Api\CurrentUser::class)->getMock();
@@ -381,7 +381,7 @@ public function testRegisterInsertsModule()
381381
->expects($this->once())
382382
->method('findByUrl')
383383
->with($this->equalTo($repository->html_url))
384-
->willReturn(null)
384+
->willReturn(false)
385385
;
386386

387387
$moduleMapper

0 commit comments

Comments
 (0)