| Conditions | 1 |
| Paths | 1 |
| Total Lines | 81 |
| Code Lines | 49 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 |
||
| 119 | public function getParameterProvider() |
||
| 120 | { |
||
| 121 | return [ |
||
| 122 | [ |
||
| 123 | '', |
||
| 124 | [ |
||
| 125 | '', |
||
| 126 | '', |
||
| 127 | '', |
||
| 128 | '', |
||
| 129 | '', |
||
| 130 | ], |
||
| 131 | ], |
||
| 132 | [ |
||
| 133 | '`foo` TEXT', |
||
| 134 | [ |
||
| 135 | '', |
||
| 136 | 'foo', |
||
| 137 | 'TEXT', |
||
| 138 | '', |
||
| 139 | '', |
||
| 140 | ], |
||
| 141 | ], |
||
| 142 | [ |
||
| 143 | '`foo` INT(20)', |
||
| 144 | [ |
||
| 145 | '', |
||
| 146 | 'foo', |
||
| 147 | 'INT', |
||
| 148 | '20', |
||
| 149 | '', |
||
| 150 | ], |
||
| 151 | ], |
||
| 152 | [ |
||
| 153 | 'IN `fo``fo` INT UNSIGNED', |
||
| 154 | [ |
||
| 155 | 'IN', |
||
| 156 | 'fo`fo', |
||
| 157 | 'INT', |
||
| 158 | '', |
||
| 159 | 'UNSIGNED', |
||
| 160 | ], |
||
| 161 | ], |
||
| 162 | [ |
||
| 163 | 'OUT bar VARCHAR(1) CHARSET utf8', |
||
| 164 | [ |
||
| 165 | 'OUT', |
||
| 166 | 'bar', |
||
| 167 | 'VARCHAR', |
||
| 168 | '1', |
||
| 169 | 'utf8', |
||
| 170 | ], |
||
| 171 | ], |
||
| 172 | [ |
||
| 173 | '`"baz\'\'` ENUM(\'a\', \'b\') CHARSET latin1', |
||
| 174 | [ |
||
| 175 | '', |
||
| 176 | '"baz\'\'', |
||
| 177 | 'ENUM', |
||
| 178 | '\'a\',\'b\'', |
||
| 179 | 'latin1', |
||
| 180 | ], |
||
| 181 | ], |
||
| 182 | [ |
||
| 183 | 'INOUT `foo` DECIMAL(5,2) UNSIGNED ZEROFILL', |
||
| 184 | [ |
||
| 185 | 'INOUT', |
||
| 186 | 'foo', |
||
| 187 | 'DECIMAL', |
||
| 188 | '5,2', |
||
| 189 | 'UNSIGNED ZEROFILL', |
||
| 190 | ], |
||
| 191 | ], |
||
| 192 | [ |
||
| 193 | '`foo``s func` SET(\'test\'\'esc"\', \'more\\\'esc\')', |
||
| 194 | [ |
||
| 195 | '', |
||
| 196 | 'foo`s func', |
||
| 197 | 'SET', |
||
| 198 | '\'test\'\'esc"\',\'more\\\'esc\'', |
||
| 199 | '', |
||
| 200 | ], |
||
| 293 |