CrateKeywords::getKeywords()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 90
Code Lines 88

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 89
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 88
c 1
b 0
f 0
dl 0
loc 90
ccs 89
cts 89
cp 1
rs 8.2617
cc 1
nc 1
nop 0
crap 1

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
 * Licensed to CRATE Technology GmbH("Crate") under one or more contributor
4
 * license agreements.  See the NOTICE file distributed with this work for
5
 * additional information regarding copyright ownership.  Crate licenses
6
 * this file to you under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.  You may
8
 * obtain a copy of the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15
 * License for the specific language governing permissions and limitations
16
 * under the License.
17
 *
18
 * However, if you have executed another commercial license agreement
19
 * with Crate these terms will supersede the license and you may use the
20
 * software solely pursuant to the terms of the relevant commercial agreement.
21
 */
22
namespace Crate\DBAL\Platforms\Keywords;
23
24
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
25
26
class CrateKeywords extends KeywordList
27
{
28
    public function getName()
29
    {
30
        return 'Crate';
31
    }
32
33 54
    protected function getKeywords()
34
    {
35 54
        return array(
36 54
            'ALL',
37 54
            'ANALYSE',
38 54
            'ANALYZE',
39 54
            'AND',
40 54
            'ANY',
41 54
            'AS',
42 54
            'ASC',
43 54
            'AUTHORIZATION',
44 54
            'BETWEEN',
45 54
            'BINARY',
46 54
            'BOTH',
47 54
            'CASE',
48 54
            'CAST',
49 54
            'CHECK',
50 54
            'COLLATE',
51 54
            'COLUMN',
52 54
            'CONSTRAINT',
53 54
            'CREATE',
54 54
            'CURRENT_DATE',
55 54
            'CURRENT_TIME',
56 54
            'CURRENT_TIMESTAMP',
57 54
            'CURRENT_USER',
58 54
            'DEFAULT',
59 54
            'DEFERRABLE',
60 54
            'DESC',
61 54
            'DISTINCT',
62 54
            'DO',
63 54
            'ELSE',
64 54
            'END',
65 54
            'EXCEPT',
66 54
            'FALSE',
67 54
            'FOR',
68 54
            'FOREIGN',
69 54
            'FREEZE',
70 54
            'FROM',
71 54
            'FULL',
72 54
            'GRANT',
73 54
            'GROUP',
74 54
            'HAVING',
75 54
            'ILIKE',
76 54
            'IN',
77 54
            'INITIALLY',
78 54
            'INNER',
79 54
            'INTERSECT',
80 54
            'INTO',
81 54
            'IS',
82 54
            'ISNULL',
83 54
            'JOIN',
84 54
            'LEADING',
85 54
            'LEFT',
86 54
            'LIKE',
87 54
            'LIMIT',
88 54
            'LOCALTIME',
89 54
            'LOCALTIMESTAMP',
90 54
            'NATURAL',
91 54
            'NEW',
92 54
            'NOT',
93 54
            'NOTNULL',
94 54
            'NULL',
95 54
            'OFF',
96 54
            'OFFSET',
97 54
            'OLD',
98 54
            'ON',
99 54
            'ONLY',
100 54
            'OR',
101 54
            'ORDER',
102 54
            'OUTER',
103 54
            'OVERLAPS',
104 54
            'PLACING',
105 54
            'PRIMARY',
106 54
            'REFERENCES',
107 54
            'SELECT',
108 54
            'SESSION_USER',
109 54
            'SIMILAR',
110 54
            'SOME',
111 54
            'TABLE',
112 54
            'THEN',
113 54
            'TO',
114 54
            'TRAILING',
115 54
            'TRUE',
116 54
            'UNION',
117 54
            'UNIQUE',
118 54
            'USER',
119 54
            'USING',
120 54
            'VERBOSE',
121 54
            'WHEN',
122 54
            'WHERE'
123 54
        );
124
    }
125
}
126