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