Code Duplication    Length = 9-9 lines in 2 locations

src/POData/ObjectModel/ObjectModelSerializerBase.php 1 location

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

src/POData/UriProcessor/UriProcessor.php 1 location

@@ 660-668 (lines=9) @@
657
     *
658
     * @return ResourceSetWrapper
659
     */
660
    private function _getCurrentResourceSetWrapper()
661
    {
662
        $count = count($this->_segmentResourceSetWrappers);
663
        if ($count == 0) {
664
            return $this->request->getTargetResourceSetWrapper();
665
        } else {
666
            return $this->_segmentResourceSetWrappers[$count - 1];
667
        }
668
    }
669
670
    /**
671
     * Pushes a segment for the root of the tree