Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 286-294 (lines=9) @@
283
        $keyProperties = $resourceType->getKeyProperties();
284
        $keyPropertiesCount = count($keyProperties);
285
        if (!empty($this->namedValues)) {
286
            if (count($this->namedValues) != $keyPropertiesCount) {
287
                throw ODataException::createSyntaxError(
288
                    Messages::keyDescriptorKeyCountNotMatching(
289
                        $segmentAsString,
290
                        $keyPropertiesCount,
291
                        count($this->namedValues)
292
                    )
293
                );
294
            }
295
296
            foreach ($keyProperties as $keyName => $keyResourceProperty) {
297
                if (!array_key_exists($keyName, $this->namedValues)) {
@@ 329-337 (lines=9) @@
326
                $this->validatedNamedValues[$keyName] = $this->namedValues[$keyName];
327
            }
328
        } else {
329
            if (count($this->positionalValues) != $keyPropertiesCount) {
330
                throw ODataException::createSyntaxError(
331
                    Messages::keyDescriptorKeyCountNotMatching(
332
                        $segmentAsString,
333
                        $keyPropertiesCount,
334
                        count($this->positionalValues)
335
                    )
336
                );
337
            }
338
339
            $i = 0;
340
            foreach ($keyProperties as $keyName => $keyResourceProperty) {