Code Duplication    Length = 5-7 lines in 2 locations

src/Container/src/Container.php 2 locations

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