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

@@ 301-309 (lines=9) @@
298
                $typeProvided = $this->namedValues[$keyName][1];
299
                $expectedType = $keyResourceProperty->getInstanceType();
300
                assert($expectedType instanceof IType, get_class($expectedType));
301
                if (!$expectedType->isCompatibleWith($typeProvided)) {
302
                    throw ODataException::createSyntaxError(
303
                        Messages::keyDescriptorInCompatibleKeyType(
304
                            $segmentAsString,
305
                            $keyName,
306
                            $expectedType->getFullTypeName(),
307
                            $typeProvided->getFullTypeName()
308
                        )
309
                    );
310
                }
311
312
                $this->validatedNamedValues[$keyName] = $this->namedValues[$keyName];
@@ 331-339 (lines=9) @@
328
                $expectedType = $keyResourceProperty->getInstanceType();
329
                assert($expectedType instanceof IType, get_class($expectedType));
330
331
                if (!$expectedType->isCompatibleWith($typeProvided)) {
332
                    throw ODataException::createSyntaxError(
333
                        Messages::keyDescriptorInCompatibleKeyTypeAtPosition(
334
                            $segmentAsString,
335
                            $keyResourceProperty->getName(),
336
                            $i,
337
                            $expectedType->getFullTypeName(),
338
                            $typeProvided->getFullTypeName()
339
                        )
340
                    );
341
                }
342