Code Duplication    Length = 8-9 lines in 3 locations

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

@@ 83-90 (lines=8) @@
80
                $j = count($orderBySubPathSegments) - 1;
81
                $expectedType = $orderBySubPathSegments[$j]->getInstanceType();
82
                assert($expectedType instanceof IType, get_class($expectedType));
83
                if (!$expectedType->isCompatibleWith($typeProvidedInSkipToken)) {
84
                    throw ODataException::createSyntaxError(
85
                        Messages::skipTokenParserInCompatibleTypeAtPosition(
86
                            $skipToken,
87
                            $expectedType->getFullTypeName(),
88
                            $i,
89
                            $typeProvidedInSkipToken->getFullTypeName()
90
                        )
91
                    );
92
                }
93
            }

src/POData/UriProcessor/ResourcePathProcessor/SegmentParser/KeyDescriptor.php 2 locations

@@ 316-324 (lines=9) @@
313
                $typeProvided = $this->namedValues[$keyName][1];
314
                $expectedType = $keyResourceProperty->getInstanceType();
315
                assert($expectedType instanceof IType, get_class($expectedType));
316
                if (!$expectedType->isCompatibleWith($typeProvided)) {
317
                    throw ODataException::createSyntaxError(
318
                        Messages::keyDescriptorInCompatibleKeyType(
319
                            $segmentAsString,
320
                            $keyName,
321
                            $expectedType->getFullTypeName(),
322
                            $typeProvided->getFullTypeName()
323
                        )
324
                    );
325
                }
326
327
                $this->validatedNamedValues[$keyName] = $this->namedValues[$keyName];
@@ 346-354 (lines=9) @@
343
                $expectedType = $keyResourceProperty->getInstanceType();
344
                assert($expectedType instanceof IType, get_class($expectedType));
345
346
                if (!$expectedType->isCompatibleWith($typeProvided)) {
347
                    throw ODataException::createSyntaxError(
348
                        Messages::keyDescriptorInCompatibleKeyTypeAtPosition(
349
                            $segmentAsString,
350
                            $keyResourceProperty->getName(),
351
                            $i,
352
                            $expectedType->getFullTypeName(),
353
                            $typeProvided->getFullTypeName()
354
                        )
355
                    );
356
                }
357