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