Code Duplication    Length = 9-9 lines in 2 locations

src/POData/ObjectModel/ObjectModelSerializerBase.php 1 location

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

src/POData/UriProcessor/UriProcessor.php 1 location

@@ 539-547 (lines=9) @@
536
     *
537
     * @return ResourceSetWrapper
538
     */
539
    private function _getCurrentResourceSetWrapper()
540
    {
541
        $count = count($this->_segmentResourceSetWrappers);
542
        if ($count == 0) {
543
            return $this->request->getTargetResourceSetWrapper();
544
        } else {
545
            return $this->_segmentResourceSetWrappers[$count - 1];
546
        }
547
    }
548
549
    /**
550
     * Pushes a segment for the root of the tree