Code Duplication    Length = 7-7 lines in 2 locations

src/Knp/FriendlyContexts/Builder/RequestBuilder.php 2 locations

@@ 115-121 (lines=7) @@
112
    {
113
        $method = strtoupper($method);
114
115
        if (!in_array($method, self::getAcceptedMethods())) {
116
            throw new \InvalidArgumentException(sprintf(
117
                'The requets method "%s" is not a valid HTTP method (valid method are "%s")',
118
                $method,
119
                implode(', ', self::getAcceptedMethods())
120
            ));
121
        }
122
123
        $this->method = $method;
124
@@ 130-136 (lines=7) @@
127
128
    public function addRequestBuilder(RequestBuilderInterface $builder, $method)
129
    {
130
        if (!in_array($method, self::getAcceptedMethods())) {
131
            throw new \InvalidArgumentException(sprintf(
132
                'The requets method "%s" is not a valid HTTP method (valid method are "%s")',
133
                $method,
134
                implode(', ', self::getAcceptedMethods())
135
            ));
136
        }
137
138
        if (isset($this->requestBuilders[$method])) {
139
            throw new \RuntimeException(sprintf(