Code Duplication    Length = 3-3 lines in 4 locations

src/Swagger/ApiDocumentationBuilder.php 4 locations

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