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

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