Code Duplication    Length = 5-5 lines in 2 locations

src/Generation/Builder/MethodBodyBuilder.php 1 location

@@ 532-536 (lines=5) @@
529
            $this->methodBody->add('$context->enableMaxDepthChecks();');
530
        }
531
532
        if (!empty($context['attributes'])) {
533
            foreach ($context['attributes'] as $key => $value) {
534
                $this->methodBody->add('$context->setAttribute("%s", "%s");', $key, $value);
535
            }
536
        }
537
    }
538
539
    /**

src/Http/Response.php 1 location

@@ 108-112 (lines=5) @@
105
            $context->enableMaxDepthChecks();
106
        }
107
108
        if (!empty($this->context['attributes'])) {
109
            foreach ($this->context['attributes'] as $key => $value) {
110
                $context->setAttribute($key, $value);
111
            }
112
        }
113
114
        if (!empty($this->context['depth'])) {
115
            $contextDepth = (int) $this->context['depth'];