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

@@ 905-909 (lines=5) @@
902
903
            if ($nonNull && is_array($result)) {
904
                $subProp->value = $this->writeBagValue($resource, $result);
905
            } elseif ($resource instanceof ResourcePrimitiveType && $nonNull) {
906
                $rType = $resource->getInstanceType();
907
                assert($rType instanceof IType, get_class($rType));
908
                $subProp->value = $this->primitiveToString($rType, $result);
909
            } elseif ($resource instanceof ResourceComplexType && $nonNull) {
910
                $subProp->value = $this->writeComplexValue($resource, $result, $flake->getName());
911
            }
912
            $propertyContent->properties[] = $subProp;