Code Duplication    Length = 6-6 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Assert.php 2 locations

@@ 57-62 (lines=6) @@
54
            $required = array_diff($expectedKeys, $givenKeys);
55
56
            $message = 'Keys do not match requirements';
57
            if (!empty($additional)) {
58
                $message .= sprintf(
59
                    ', additional keys "%s" found',
60
                    implode('", "', array_diff($givenKeys, $expectedKeys))
61
                );
62
            }
63
64
            if (!empty($required)) {
65
                $message .= sprintf(
@@ 64-69 (lines=6) @@
61
                );
62
            }
63
64
            if (!empty($required)) {
65
                $message .= sprintf(
66
                    ', required keys "%s" are missing',
67
                    implode('", "', array_diff($expectedKeys, $givenKeys))
68
                );
69
            }
70
        }
71
72
        throw new AssertionFailedException($message, 0, $propertyPath, $array);