| Conditions | 1 |
| Paths | 1 |
| Total Lines | 112 |
| Code Lines | 95 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
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 |
||
| 192 | public function getSafariVersions() |
||
| 193 | { |
||
| 194 | return array( |
||
| 195 | // On Mac OS. |
||
| 196 | '0.8' => array('version' => '48', 'codename' => ''), |
||
| 197 | '73' => array('version' => '0.9', 'codename' => ''), |
||
| 198 | // v. 1.0 |
||
| 199 | '85' => array('version' => '1.0', 'codename' => ''), |
||
| 200 | '85.8.5' => array('version' => '1.0.3', 'codename' => ''), |
||
| 201 | '100' => array('version' => '1.1', 'codename' => ''), |
||
| 202 | '125' => array('version' => '1.2', 'codename' => ''), |
||
| 203 | '312' => array('version' => '1.3', 'codename' => ''), |
||
| 204 | '312.3' => array('version' => '1.3.1', 'codename' => ''), |
||
| 205 | '312.5' => array('version' => '1.3.2', 'codename' => ''), |
||
| 206 | '312.6' => array('version' => '1.3.2', 'codename' => ''), |
||
| 207 | '412' => array('version' => '2.0', 'codename' => ''), |
||
| 208 | '416.11' => array('version' => '2.0.2', 'codename' => ''), |
||
| 209 | '419.3' => array('version' => '2.0.4', 'codename' => ''), |
||
| 210 | '522.11' => array('version' => '3.0', 'codename' => ''), |
||
| 211 | '522.12' => array('version' => '3.0.2', 'codename' => ''), |
||
| 212 | '522.12.1' => array('version' => '3.0.3', 'codename' => ''), |
||
| 213 | '523.10' => array('version' => '3.0.4', 'codename' => ''), |
||
| 214 | '525.13' => array('version' => '3.1', 'codename' => ''), |
||
| 215 | '525.17' => array('version' => '3.1.1', 'codename' => ''), |
||
| 216 | '525.20' => array('version' => '3.1.1', 'codename' => ''), |
||
| 217 | '525.21' => array('version' => '3.1.2', 'codename' => ''), |
||
| 218 | '525.26' => array('version' => '3.2', 'codename' => ''), |
||
| 219 | '525.27' => array('version' => '3.2.1', 'codename' => ''), |
||
| 220 | '525.28' => array('version' => '3.2.3', 'codename' => ''), |
||
| 221 | '526.11.2' => array('version' => '4.0 Beta', 'codename' => ''), |
||
| 222 | '528.16' => array('version' => array('4.0', '4.0 Beta'), 'codename' => ''), |
||
| 223 | '528.17' => array('version' => array('4.0', '4.0 Beta'), 'codename' => ''), |
||
| 224 | '530.17' => array('version' => array('4.0', '4.0.1'), 'codename' => ''), |
||
| 225 | '530.18' => array('version' => '4.0.1', 'codename' => ''), |
||
| 226 | '530.19' => array('version' => '4.0.2', 'codename' => ''), |
||
| 227 | '531.9' => array('version' => '4.0.3', 'codename' => ''), |
||
| 228 | '531.21.10' => array('version' => '4.0.4', 'codename' => ''), |
||
| 229 | '531.22.7' => array('version' => '4.0.5', 'codename' => ''), |
||
| 230 | '533.16' => array('version' => array('4.1', '5.0'), 'codename' => ''), |
||
| 231 | '533.17.8' => array('version' => array('4.1.1', '5.0.1'), 'codename' => ''), |
||
| 232 | '533.18.5' => array('version' => array('4.1.2', '5.0.2'), 'codename' => ''), |
||
| 233 | '533.19.4' => array('version' => array('4.1.3', '5.0.3'), 'codename' => ''), |
||
| 234 | '533.20.27' => array('version' => '5.0.4', 'codename' => ''), |
||
| 235 | '533.21.1' => array('version' => '5.0.5', 'codename' => ''), |
||
| 236 | '533.22.3' => array('version' => '5.0.6', 'codename' => ''), |
||
| 237 | |||
| 238 | // From https://bugs.webkit.org/show_bug.cgi?id=44230 |
||
| 239 | '534.6+' => array('version' => '5.0.1', 'codename' => ''), |
||
| 240 | // From https://bugs.webkit.org/show_bug.cgi?id=45632 |
||
| 241 | '534.8' => array('version' => '5.0.2', 'codename' => ''), |
||
| 242 | '534.8+' => array('version' => '5.0.2', 'codename' => ''), |
||
| 243 | // From https://bugs.webkit.org/show_bug.cgi?id=48312 |
||
| 244 | '534.11' => array('version' => '5.0.2', 'codename' => ''), |
||
| 245 | '534.11+' => array('version' => '5.0.2', 'codename' => ''), |
||
| 246 | '534.48.3' => array('version' => '5.1', 'codename' => ''), |
||
| 247 | '534.51.22' => array('version' => '5.1.1', 'codename' => ''), |
||
| 248 | '534.52.7' => array('version' => '5.1.2', 'codename' => ''), |
||
| 249 | '534.53.10' => array('version' => '5.1.3', 'codename' => ''), |
||
| 250 | '534.54.16' => array('version' => '5.1.4', 'codename' => ''), |
||
| 251 | '534.55.3' => array('version' => '5.1.5', 'codename' => ''), |
||
| 252 | '534.56.5' => array('version' => '5.1.6', 'codename' => ''), |
||
| 253 | '534.57.2' => array('version' => '5.1.7', 'codename' => ''), |
||
| 254 | '534.58.2' => array('version' => '5.1.8', 'codename' => ''), |
||
| 255 | '534.59.8' => array('version' => '5.1.9', 'codename' => ''), |
||
| 256 | '534.59.10' => array('version' => '5.1.10', 'codename' => ''), |
||
| 257 | '536.2+' => array('version' => '5.1.2', 'codename' => ''), |
||
| 258 | '536.25' => array('version' => '6.0', 'codename' => ''), |
||
| 259 | '536.26' => array('version' => '6.0.1', 'codename' => ''), |
||
| 260 | '536.26.17' => array('version' => '6.0.2', 'codename' => ''), |
||
| 261 | '536.28.10' => array('version' => '6.0.3', 'codename' => ''), |
||
| 262 | '536.29.13' => array('version' => '6.0.4', 'codename' => ''), |
||
| 263 | '536.30.1' => array('version' => '6.0.5', 'codename' => ''), |
||
| 264 | // From https://gist.github.com/rniwa/2721861 |
||
| 265 | '537.1+' => array('version' => '5.1.5', 'codename' => ''), |
||
| 266 | '537.10+' => array('version' => '5.1', 'codename' => ''), |
||
| 267 | '537.43.58' => array('version' => '6.1', 'codename' => ''), |
||
| 268 | '537.73.11' => array('version' => array('6.1.1', '7.0.1'), 'codename' => ''), |
||
| 269 | // @todo fill gaps here from 6.1.2 to 6.2.7 |
||
| 270 | '537.85.17' => array('version' => array('6.2.8', '7.1.8'), 'codename' => ''), |
||
| 271 | '537.71' => array('version' => '7.0', 'codename' => ''), |
||
| 272 | // @todo fill gaps here for 7.0.2 |
||
| 273 | '537.75.14' => array('version' => '7.0.3', 'codename' => ''), |
||
| 274 | '537.76.4' => array('version' => '7.0.4', 'codename' => ''), |
||
| 275 | '537.77.4' => array('version' => '7.0.5', 'codename' => ''), |
||
| 276 | '537.78.2' => array('version' => '7.0.6', 'codename' => ''), |
||
| 277 | // @todo fill gaps here for 7.1 to 7.1.7 |
||
| 278 | '538.35.8' => array('version' => '8.0', 'codename' => ''), |
||
| 279 | // @todo fill gaps here for 8.0.1 to 8.0.5 |
||
| 280 | '600.6.3' => array('version' => '8.0.6', 'codename' => ''), |
||
| 281 | '600.7.12' => array('version' => '8.0.7', 'codename' => ''), |
||
| 282 | // @todo fill gap here for 8.0.8 |
||
| 283 | |||
| 284 | // On Windows |
||
| 285 | '522.11.3' => array('version' => '3.0', 'codename' => ''), |
||
| 286 | '522.12.2' => array('version' => '3.0.1', 'codename' => ''), |
||
| 287 | '522.13.1' => array('version' => '3.0.2', 'codename' => ''), |
||
| 288 | '522.15.5' => array('version' => '3.0.3', 'codename' => ''), |
||
| 289 | '523.12.9' => array('version' => '3.0.4', 'codename' => ''), |
||
| 290 | '523.13' => array('version' => '3.0.4', 'codename' => ''), |
||
| 291 | '523.15' => array('version' => '3.0.4', 'codename' => ''), |
||
| 292 | '525.26.13' => array('version' => '3.2', 'codename' => ''), |
||
| 293 | '525.27.1' => array('version' => '3.2.1', 'codename' => ''), |
||
| 294 | '525.28.1' => array('version' => '3.2.2', 'codename' => ''), |
||
| 295 | '525.29.1' => array('version' => '3.2.3', 'codename' => ''), |
||
| 296 | '526.12.2' => array('version' => '4.0', 'codename' => ''), |
||
| 297 | '528.1.1' => array('version' => '4.0', 'codename' => ''), |
||
| 298 | '530.19.1' => array('version' => '4.0.2', 'codename' => ''), |
||
| 299 | '531.9.1' => array('version' => '4.0.3', 'codename' => ''), |
||
| 300 | '534.30' => array('version' => '5.1', 'codename' => ''), |
||
| 301 | '534.50' => array('version' => '5.1', 'codename' => ''), |
||
| 302 | ); |
||
| 303 | } |
||
| 304 | |||
| 310 | } |