Code Duplication    Length = 3-3 lines in 4 locations

src/Swagger/ApiDocumentationBuilder.php 4 locations

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