Code Duplication    Length = 4-4 lines in 2 locations

src/Serialisers/IronicSerialiser.php 2 locations

@@ 109-112 (lines=4) @@
106
            return null;
107
        }
108
109
        if (0 == count($this->lightStack)) {
110
            $typeName = $this->getRequest()->getTargetResourceType()->getName();
111
            array_push($this->lightStack, [$typeName, $typeName]);
112
        }
113
114
        $stackCount = count($this->lightStack);
115
        $topOfStack = $this->lightStack[$stackCount-1];
@@ 219-222 (lines=4) @@
216
    {
217
        assert(is_array($entryObjects), '!is_array($entryObjects)');
218
219
        if (0 == count($this->lightStack)) {
220
            $typeName = $this->getRequest()->getTargetResourceType()->getName();
221
            array_push($this->lightStack, [$typeName, $typeName]);
222
        }
223
        $setName = $this->getRequest()->getTargetResourceSetWrapper()->getName();
224
225