Completed
Push — develop ( 72ba3e...de019a )
by Marco
25s queued 12s
created

MySQL80Keywords::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Doctrine\DBAL\Platforms\Keywords;
4
5
use function array_merge;
6
7
/**
8
 * MySQL 8.0 reserved keywords list.
9
 */
10
class MySQL80Keywords extends MySQL57Keywords
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getName()
16
    {
17
        return 'MySQL80';
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @link https://dev.mysql.com/doc/refman/8.0/en/keywords.html
24
     */
25 18
    protected function getKeywords()
26
    {
27 18
        $keywords = parent::getKeywords();
28
29 18
        $keywords = array_merge($keywords, [
30 18
            'ADMIN',
31
            'CUBE',
32
            'CUME_DIST',
33
            'DENSE_RANK',
34
            'EMPTY',
35
            'EXCEPT',
36
            'FIRST_VALUE',
37
            'FUNCTION',
38
            'GROUPING',
39
            'GROUPS',
40
            'JSON_TABLE',
41
            'LAG',
42
            'LAST_VALUE',
43
            'LEAD',
44
            'NTH_VALUE',
45
            'NTILE',
46
            'OF',
47
            'OVER',
48
            'PERCENT_RANK',
49
            'PERSIST',
50
            'PERSIST_ONLY',
51
            'RANK',
52
            'RECURSIVE',
53
            'ROW',
54
            'ROWS',
55
            'ROW_NUMBER',
56
            'SYSTEM',
57
            'WINDOW',
58
        ]);
59
60 18
        return $keywords;
61
    }
62
}
63