Skip to content

Commit c28b543

Browse files
authored
Merge branch 'master' into improve/travis-build
2 parents 0c57acf + e4e25b4 commit c28b543

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Resolver/AbstractResolver.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,19 @@ public function addSolution($name, callable $solutionFunc, array $solutionFuncAr
4242
return $this;
4343
}
4444

45+
public function hasSolution($name)
46+
{
47+
return isset($this->solutions[$name]);
48+
}
49+
4550
/**
4651
* @param $name
4752
*
4853
* @return mixed
4954
*/
5055
public function getSolution($name)
5156
{
52-
return isset($this->solutions[$name]) ? $this->loadSolution($name) : null;
57+
return $this->loadSolution($name);
5358
}
5459

5560
/**
@@ -77,6 +82,10 @@ public function getSolutionOptions($name)
7782
*/
7883
private function loadSolution($name)
7984
{
85+
if (!$this->hasSolution($name)) {
86+
return null;
87+
}
88+
8089
if ($this->fullyLoadedSolutions[$name]) {
8190
return $this->solutions[$name];
8291
} else {

Resolver/TypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function hasNeedListOfWrapper($alias)
102102
protected function postLoadSolution($solution)
103103
{
104104
// also add solution with real type name if needed for typeLoader when using autoMapping
105-
if ($solution && !isset($this->getSolutions()[$solution->name])) {
105+
if ($solution && !$this->hasSolution($solution->name)) {
106106
$this->addSolution($solution->name, function () use ($solution) {
107107
return $solution;
108108
});

0 commit comments

Comments
 (0)