Failed Conditions
Push — master ( 01143c...7811e4 )
by Sergei
21s queued 14s
created

PostgreSQL94Keywords::getKeywords()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 102
Code Lines 100

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 100
dl 0
loc 102
rs 8
c 0
b 0
f 0
cc 1
nc 1
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Platforms\Keywords;
6
7
/**
8
 * PostgreSQL 9.4 reserved keywords list.
9
 */
10
class PostgreSQL94Keywords extends KeywordList
11
{
12
    public function getName() : string
13
    {
14
        return 'PostgreSQL94';
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    protected function getKeywords() : array
21
    {
22
        return [
23
            'ALL',
24
            'ANALYSE',
25
            'ANALYZE',
26
            'AND',
27
            'ANY',
28
            'ARRAY',
29
            'AS',
30
            'ASC',
31
            'ASYMMETRIC',
32
            'AUTHORIZATION',
33
            'BINARY',
34
            'BOTH',
35
            'CASE',
36
            'CAST',
37
            'CHECK',
38
            'COLLATE',
39
            'COLLATION',
40
            'COLUMN',
41
            'CONCURRENTLY',
42
            'CONSTRAINT',
43
            'CREATE',
44
            'CROSS',
45
            'CURRENT_CATALOG',
46
            'CURRENT_DATE',
47
            'CURRENT_ROLE',
48
            'CURRENT_SCHEMA',
49
            'CURRENT_TIME',
50
            'CURRENT_TIMESTAMP',
51
            'CURRENT_USER',
52
            'DEFAULT',
53
            'DEFERRABLE',
54
            'DESC',
55
            'DISTINCT',
56
            'DO',
57
            'ELSE',
58
            'END',
59
            'EXCEPT',
60
            'FALSE',
61
            'FETCH',
62
            'FOR',
63
            'FOREIGN',
64
            'FREEZE',
65
            'FROM',
66
            'FULL',
67
            'GRANT',
68
            'GROUP',
69
            'HAVING',
70
            'ILIKE',
71
            'IN',
72
            'INITIALLY',
73
            'INNER',
74
            'INTERSECT',
75
            'INTO',
76
            'IS',
77
            'ISNULL',
78
            'JOIN',
79
            'LATERAL',
80
            'LEADING',
81
            'LEFT',
82
            'LIKE',
83
            'LIMIT',
84
            'LOCALTIME',
85
            'LOCALTIMESTAMP',
86
            'NATURAL',
87
            'NOT',
88
            'NOTNULL',
89
            'NULL',
90
            'OFFSET',
91
            'ON',
92
            'ONLY',
93
            'OR',
94
            'ORDER',
95
            'OUTER',
96
            'OVERLAPS',
97
            'PLACING',
98
            'PRIMARY',
99
            'REFERENCES',
100
            'RETURNING',
101
            'RIGHT',
102
            'SELECT',
103
            'SESSION_USER',
104
            'SIMILAR',
105
            'SOME',
106
            'SYMMETRIC',
107
            'TABLE',
108
            'THEN',
109
            'TO',
110
            'TRAILING',
111
            'TRUE',
112
            'UNION',
113
            'UNIQUE',
114
            'USER',
115
            'USING',
116
            'VARIADIC',
117
            'VERBOSE',
118
            'WHEN',
119
            'WHERE',
120
            'WINDOW',
121
            'WITH',
122
        ];
123
    }
124
}
125