Code Duplication    Length = 4-4 lines in 4 locations

Twig/DoctrineExtension.php 4 locations

@@ 202-205 (lines=4) @@
199
200
        // Check if we can match the query against any of the major types
201
        switch (true) {
202
            case stripos($query, 'SELECT') !== false:
203
                $keywords = array('SELECT', 'FROM', 'WHERE', 'HAVING', 'ORDER BY', 'LIMIT');
204
                $required = 2;
205
                break;
206
207
            case stripos($query, 'DELETE') !== false:
208
                $keywords = array('DELETE', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT');
@@ 207-210 (lines=4) @@
204
                $required = 2;
205
                break;
206
207
            case stripos($query, 'DELETE') !== false:
208
                $keywords = array('DELETE', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT');
209
                $required = 2;
210
                break;
211
212
            case stripos($query, 'UPDATE') !== false:
213
                $keywords = array('UPDATE', 'SET', 'WHERE', 'ORDER BY', 'LIMIT');
@@ 212-215 (lines=4) @@
209
                $required = 2;
210
                break;
211
212
            case stripos($query, 'UPDATE') !== false:
213
                $keywords = array('UPDATE', 'SET', 'WHERE', 'ORDER BY', 'LIMIT');
214
                $required = 2;
215
                break;
216
217
            case stripos($query, 'INSERT') !== false:
218
                $keywords = array('INSERT', 'INTO', 'VALUE', 'VALUES');
@@ 217-220 (lines=4) @@
214
                $required = 2;
215
                break;
216
217
            case stripos($query, 'INSERT') !== false:
218
                $keywords = array('INSERT', 'INTO', 'VALUE', 'VALUES');
219
                $required = 2;
220
                break;
221
222
            // If there's no match so far just truncate it to the maximum allowed by the interface
223
            default: