Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 272-280 (lines=9) @@
269
        $keyProperties = $resourceType->getKeyProperties();
270
        $keyPropertiesCount = count($keyProperties);
271
        if (!empty($this->namedValues)) {
272
            if (count($this->namedValues) != $keyPropertiesCount) {
273
                throw ODataException::createSyntaxError(
274
                    Messages::keyDescriptorKeyCountNotMatching(
275
                        $segmentAsString,
276
                        $keyPropertiesCount,
277
                        count($this->namedValues)
278
                    )
279
                );
280
            }
281
282
            foreach ($keyProperties as $keyName => $keyResourceProperty) {
283
                if (!array_key_exists($keyName, $this->namedValues)) {
@@ 315-323 (lines=9) @@
312
                $this->validatedNamedValues[$keyName] = $this->namedValues[$keyName];
313
            }
314
        } else {
315
            if (count($this->positionalValues) != $keyPropertiesCount) {
316
                throw ODataException::createSyntaxError(
317
                    Messages::keyDescriptorKeyCountNotMatching(
318
                        $segmentAsString,
319
                        $keyPropertiesCount,
320
                        count($this->positionalValues)
321
                    )
322
                );
323
            }
324
325
            $i = 0;
326
            foreach ($keyProperties as $keyName => $keyResourceProperty) {