Code Duplication    Length = 9-9 lines in 2 locations

src/POData/ObjectModel/ObjectModelSerializerBase.php 1 location

@@ 182-190 (lines=9) @@
179
     * 
180
     * @return ResourceSetWrapper
181
     */
182
    protected function getCurrentResourceSetWrapper()
183
    {
184
        $count = count($this->_segmentResourceSetWrappers);
185
        if ($count == 0) {
186
            return $this->request->getTargetResourceSetWrapper();
187
        } else {
188
            return $this->_segmentResourceSetWrappers[$count - 1];
189
        }
190
    }
191
192
    /**
193
     * Whether the current resource set is root resource set.

src/POData/UriProcessor/UriProcessor.php 1 location

@@ 634-642 (lines=9) @@
631
     *
632
     * @return ResourceSetWrapper
633
     */
634
    private function _getCurrentResourceSetWrapper()
635
    {
636
        $count = count($this->_segmentResourceSetWrappers);
637
        if ($count == 0) {
638
            return $this->request->getTargetResourceSetWrapper();
639
        } else {
640
            return $this->_segmentResourceSetWrappers[$count - 1];
641
        }
642
    }
643
644
    /**
645
     * Pushes a segment for the root of the tree