Code Duplication    Length = 3-3 lines in 4 locations

src/Swagger/ApiDocumentationBuilder.php 4 locations

@@ 180-182 (lines=3) @@
177
        switch ($method) {
178
            case 'GET':
179
                if ($collection) {
180
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
181
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves the collection of %s resources.', $shortName);
182
                    }
183
                } else {
184
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
185
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves %s resource.', $shortName);
@@ 184-186 (lines=3) @@
181
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves the collection of %s resources.', $shortName);
182
                    }
183
                } else {
184
                    if (!isset($swaggerOperation[$methodSwagger]['title'])) {
185
                        $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves %s resource.', $shortName);
186
                    }
187
                    $swaggerOperation[$methodSwagger]['parameters'] = [
188
                        'name' => 'id',
189
                        'in' => 'path',
@@ 197-199 (lines=3) @@
194
            break;
195
196
            case 'POST':
197
                if (!isset($swaggerOperation[$methodSwagger]['title'])) {
198
                    $swaggerOperation[$methodSwagger]['summary'] = sprintf('Creates a %s resource.', $shortName);
199
                }
200
                $swaggerOperation[$methodSwagger]['parameters'] = [
201
                    'in' => 'body',
202
                    'name' => 'body',
@@ 215-217 (lines=3) @@
212
            break;
213
214
            case 'PUT':
215
                if (!isset($swaggerOperation[$methodSwagger]['title'])) {
216
                    $swaggerOperation[$methodSwagger]['summary'] = sprintf('Replaces the %s resource.', $shortName);
217
                }
218
                break;
219
        }
220