Completed
Pull Request — master (#38)
by
unknown
07:28 queued 06:13
created

CrateKeywords::getKeywords()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 92
Code Lines 89

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 88
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 92
ccs 88
cts 88
cp 1
rs 8.491
c 0
b 0
f 0
cc 1
eloc 89
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 25
    protected function getKeywords()
34
    {
35
        return array(
36 25
            'ALL',
37 25
            'ANALYSE',
38 25
            'ANALYZE',
39 25
            'AND',
40 25
            'ANY',
41 25
            'AS',
42 25
            'ASC',
43 25
            'AUTHORIZATION',
44 25
            'BETWEEN',
45 25
            'BINARY',
46 25
            'BOTH',
47 25
            'CASE',
48 25
            'CAST',
49 25
            'CHECK',
50 25
            'COLLATE',
51 25
            'COLUMN',
52 25
            'CONSTRAINT',
53 25
            'CREATE',
54 25
            'CURRENT_DATE',
55 25
            'CURRENT_TIME',
56 25
            'CURRENT_TIMESTAMP',
57 25
            'CURRENT_USER',
58 25
            'DEFAULT',
59 25
            'DEFERRABLE',
60 25
            'DESC',
61 25
            'DISTINCT',
62 25
            'DO',
63 25
            'ELSE',
64 25
            'END',
65 25
            'EXCEPT',
66 25
            'FALSE',
67 25
            'FOR',
68 25
            'FOREIGN',
69 25
            'FREEZE',
70 25
            'FROM',
71 25
            'FULL',
72 25
            'GRANT',
73 25
            'GROUP',
74 25
            'HAVING',
75 25
            'ILIKE',
76 25
            'IN',
77 25
            'INITIALLY',
78 25
            'INNER',
79 25
            'INTERSECT',
80 25
            'INTO',
81 25
            'IS',
82 25
            'ISNULL',
83 25
            'JOIN',
84 25
            'LEADING',
85 25
            'LEFT',
86 25
            'LIKE',
87 25
            'LIMIT',
88 25
            'LOCALTIME',
89 25
            'LOCALTIMESTAMP',
90 25
            'NATURAL',
91 25
            'NEW',
92 25
            'NOT',
93 25
            'NOTNULL',
94 25
            'NULL',
95 25
            'OFF',
96 25
            'OFFSET',
97 25
            'OLD',
98 25
            'ON',
99 25
            'ONLY',
100 25
            'OR',
101 25
            'ORDER',
102 25
            'OUTER',
103 25
            'OVERLAPS',
104 25
            'PLACING',
105 25
            'PRIMARY',
106 25
            'REFERENCES',
107 25
            'SELECT',
108 25
            'SESSION_USER',
109 25
            'SIMILAR',
110 25
            'SOME',
111 25
            'TABLE',
112 25
            'THEN',
113 25
            'TO',
114 25
            'TRAILING',
115 25
            'TRUE',
116 25
            'UNION',
117 25
            'UNIQUE',
118 25
            'USER',
119 25
            'USING',
120 25
            'VERBOSE',
121 25
            'WHEN',
122
            'WHERE'
123 25
        );
124
    }
125
}
126