Code Duplication    Length = 8-10 lines in 2 locations

exercises/dependency-heaven/solution/vendor/klein/klein/src/Klein/Klein.php 2 locations

@@ 449-456 (lines=8) @@
446
                // Was a method specified? If so, check it against the current request method
447
                if (is_array($method)) {
448
                    foreach ($method as $test) {
449
                        if (strcasecmp($req_method, $test) === 0) {
450
                            $method_match = true;
451
                        } elseif (strcasecmp($req_method, 'HEAD') === 0
452
                              && (strcasecmp($test, 'HEAD') === 0 || strcasecmp($test, 'GET') === 0)) {
453
454
                            // Test for HEAD request (like GET)
455
                            $method_match = true;
456
                        }
457
                    }
458
459
                    if (null === $method_match) {
@@ 462-471 (lines=10) @@
459
                    if (null === $method_match) {
460
                        $method_match = false;
461
                    }
462
                } elseif (null !== $method && strcasecmp($req_method, $method) !== 0) {
463
                    $method_match = false;
464
465
                    // Test for HEAD request (like GET)
466
                    if (strcasecmp($req_method, 'HEAD') === 0
467
                        && (strcasecmp($method, 'HEAD') === 0 || strcasecmp($method, 'GET') === 0 )) {
468
469
                        $method_match = true;
470
                    }
471
                } elseif (null !== $method && strcasecmp($req_method, $method) === 0) {
472
                    $method_match = true;
473
                }
474