Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/RequestExpander.php 1 location

@@ 163-169 (lines=7) @@
160
     *
161
     * @return ResourceSetWrapper
162
     */
163
    private function getCurrentResourceSetWrapper()
164
    {
165
        $wraps = $this->getStack()->getSegmentWrappers();
166
        $count = count($wraps);
167
168
        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $wraps[$count - 1];
169
    }
170
171
    /**
172
     * Pushes a segment for the root of the tree

src/POData/ObjectModel/CynicSerialiser.php 1 location

@@ 634-640 (lines=7) @@
631
     *
632
     * @return ResourceSetWrapper
633
     */
634
    protected function getCurrentResourceSetWrapper()
635
    {
636
        $segmentWrappers = $this->getStack()->getSegmentWrappers();
637
        $count = count($segmentWrappers);
638
639
        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1];
640
    }
641
642
    /**
643
     * Wheter next link is needed for the current resource set (feed)