Code Duplication    Length = 5-7 lines in 2 locations

src/Container/src/Container.php 2 locations

@@ 190-196 (lines=7) @@
187
        }
188
189
        // Look up service in resolved instances first.
190
        if (isset($this->instances[$id])) {
191
            $object = $this->decorateObject($id, $this->instances[$id]);
192
            // Delete all decorator callbacks to avoid applying them once more on another get call.
193
            unset($this->decoratorDefinitions[$id]);
194
195
            return $object;
196
        }
197
198
        // Detect circular references.
199
        // We mark service as being resolved to detect circular references through out the resolution chain.
@@ 213-217 (lines=5) @@
210
            $object = $this->decorateObject($id, $object);
211
212
            // Cache shared instances.
213
            if (isset($this->shared[$id])) {
214
                $this->instances[$id] = $object;
215
                // Remove all decorator callbacks to prevent further decorations on concrete instance.
216
                unset($this->decoratorDefinitions[$id]);
217
            }
218
219
            return $object;
220
        } catch (ArgumentResolverException $resolveException) {