Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 259-267 (lines=9) @@
256
        $keyProperties = $resourceType->getKeyProperties();
257
        $keyPropertiesCount = count($keyProperties);
258
        if (!empty($this->namedValues)) {
259
            if (count($this->namedValues) != $keyPropertiesCount) {
260
                throw ODataException::createSyntaxError(
261
                    Messages::keyDescriptorKeyCountNotMatching(
262
                        $segmentAsString,
263
                        $keyPropertiesCount,
264
                        count($this->namedValues)
265
                    )
266
                );
267
            }
268
269
            foreach ($keyProperties as $keyName => $keyResourceProperty) {
270
                if (!array_key_exists($keyName, $this->namedValues)) {
@@ 301-309 (lines=9) @@
298
                $this->validatedNamedValues[$keyName] = $this->namedValues[$keyName];
299
            }
300
        } else {
301
            if (count($this->positionalValues) != $keyPropertiesCount) {
302
                throw ODataException::createSyntaxError(
303
                    Messages::keyDescriptorKeyCountNotMatching(
304
                        $segmentAsString,
305
                        $keyPropertiesCount,
306
                        count($this->positionalValues)
307
                    )
308
                );
309
            }
310
311
            $i = 0;
312
            foreach ($keyProperties as $keyName => $keyResourceProperty) {