Code Duplication    Length = 3-3 lines in 2 locations

src/JsonDiscovery.php 2 locations

@@ 196-198 (lines=3) @@
193
194
        $key = $this->json['keysByTypeName'][$typeName];
195
196
        if (!isset($this->typesByKey[$key])) {
197
            $this->typesByKey[$key] = unserialize($this->json['typesByKey'][$key]);
198
        }
199
200
        return $this->typesByKey[$key];
201
    }
@@ 225-227 (lines=3) @@
222
        }
223
224
        foreach ($this->json['keysByTypeName'] as $key) {
225
            if (!isset($this->typesByKey[$key])) {
226
                $this->typesByKey[$key] = unserialize($this->json['typesByKey'][$key]);
227
            }
228
        }
229
230
        ksort($this->typesByKey);