Code Duplication    Length = 5-6 lines in 2 locations

src/POData/UriProcessor/QueryProcessor/SkipTokenParser/InternalSkipTokenInfo.php 1 location

@@ 262-267 (lines=6) @@
259
                    if (null === $currentObject) {
260
                        $nextPageLink .= 'null, ';
261
                        break;
262
                    } elseif ($isLastSegment) {
263
                        $type = $subPathSegment->getInstanceType();
264
                        assert($type instanceof IType, get_class($type));
265
                        $value = $type->convertToOData($currentObject);
266
                        $nextPageLink .= $value . ', ';
267
                    }
268
                } catch (\ReflectionException $reflectionException) {
269
                    throw ODataException::createInternalServerError(
270
                        Messages::internalSkipTokenInfoFailedToAccessOrInitializeProperty(

src/POData/ObjectModel/CynicSerialiser.php 1 location

@@ 946-950 (lines=5) @@
943
944
            if ($nonNull && is_array($result)) {
945
                $subProp->value = $this->writeBagValue($resource, $result);
946
            } elseif ($resource instanceof ResourcePrimitiveType && $nonNull) {
947
                $rType = $resource->getInstanceType();
948
                assert($rType instanceof IType, get_class($rType));
949
                $subProp->value = $this->primitiveToString($rType, $result);
950
            } elseif ($resource instanceof ResourceComplexType && $nonNull) {
951
                $subProp->value = $this->writeComplexValue($resource, $result, $flake->getName());
952
            }
953
            $propertyContent->properties[$corn] = $subProp;