Code Duplication    Length = 3-3 lines in 4 locations

src/Swagger/ApiDocumentationBuilder.php 4 locations

@@ 188-190 (lines=3) @@
185
        switch ($method) {
186
            case 'GET':
187
                if ($collection) {
188
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
189
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves the collection of %s resources.', $shortName);
190
                    }
191
                } else {
192
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
193
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves %s resource.', $shortName);
@@ 192-194 (lines=3) @@
189
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves the collection of %s resources.', $shortName);
190
                    }
191
                } else {
192
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
193
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves %s resource.', $shortName);
194
                    }
195
                    $swaggerOperation[$methodSwagger]['parameters'] = [
196
                        'name' => 'id',
197
                        'in' => 'path',
@@ 205-207 (lines=3) @@
202
            break;
203
204
            case 'POST':
205
                if (!isset($swaggerOperation[$methodSwagger]['title'])) {
206
                    $swaggerOperation[$methodSwagger]['summary'] = sprintf('Creates a %s resource.', $shortName);
207
                }
208
                $swaggerOperation[$methodSwagger]['parameters'] = [
209
                    'in' => 'body',
210
                    'name' => 'body',
@@ 223-225 (lines=3) @@
220
            break;
221
222
            case 'PUT':
223
                if (!isset($swaggerOperation[$methodSwagger]['title'])) {
224
                    $swaggerOperation[$methodSwagger]['summary'] = sprintf('Replaces the %s resource.', $shortName);
225
                }
226
                break;
227
        }
228