Conditions | 1 |
Paths | 1 |
Total Lines | 123 |
Code Lines | 121 |
Lines | 0 |
Ratio | 0 % |
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 |
||
230 | private function ansi24part2(): Traversable |
||
231 | { |
||
232 | yield from [ |
||
233 | '0;255;0', |
||
234 | '0;255;4', |
||
235 | '0;255;8', |
||
236 | '0;255;12', |
||
237 | '0;255;16', |
||
238 | '0;255;21', |
||
239 | '0;255;25', |
||
240 | '0;255;29', |
||
241 | '0;255;33', |
||
242 | '0;255;38', |
||
243 | '0;255;42', |
||
244 | '0;255;46', |
||
245 | '0;255;50', |
||
246 | '0;255;55', |
||
247 | '0;255;59', |
||
248 | '0;255;63', |
||
249 | '0;255;67', |
||
250 | '0;255;72', |
||
251 | '0;255;76', |
||
252 | '0;255;80', |
||
253 | '0;255;85', |
||
254 | '0;255;89', |
||
255 | '0;255;93', |
||
256 | '0;255;97', |
||
257 | '0;255;102', |
||
258 | '0;255;106', |
||
259 | '0;255;110', |
||
260 | '0;255;114', |
||
261 | '0;255;119', |
||
262 | '0;255;123', |
||
263 | '0;255;127', |
||
264 | '0;255;131', |
||
265 | '0;255;135', |
||
266 | '0;255;140', |
||
267 | '0;255;144', |
||
268 | '0;255;148', |
||
269 | '0;255;153', |
||
270 | '0;255;157', |
||
271 | '0;255;161', |
||
272 | '0;255;165', |
||
273 | '0;255;169', |
||
274 | '0;255;174', |
||
275 | '0;255;178', |
||
276 | '0;255;182', |
||
277 | '0;255;187', |
||
278 | '0;255;191', |
||
279 | '0;255;195', |
||
280 | '0;255;199', |
||
281 | '0;255;203', |
||
282 | '0;255;208', |
||
283 | '0;255;212', |
||
284 | '0;255;216', |
||
285 | '0;255;221', |
||
286 | '0;255;225', |
||
287 | '0;255;229', |
||
288 | '0;255;233', |
||
289 | '0;255;237', |
||
290 | '0;255;242', |
||
291 | '0;255;246', |
||
292 | '0;255;250', |
||
293 | '0;255;255', |
||
294 | '0;250;255', |
||
295 | '0;246;255', |
||
296 | '0;242;255', |
||
297 | '0;238;255', |
||
298 | '0;233;255', |
||
299 | '0;229;255', |
||
300 | '0;225;255', |
||
301 | '0;220;255', |
||
302 | '0;216;255', |
||
303 | '0;212;255', |
||
304 | '0;208;255', |
||
305 | '0;203;255', |
||
306 | '0;199;255', |
||
307 | '0;195;255', |
||
308 | '0;191;255', |
||
309 | '0;187;255', |
||
310 | '0;182;255', |
||
311 | '0;178;255', |
||
312 | '0;174;255', |
||
313 | '0;169;255', |
||
314 | '0;165;255', |
||
315 | '0;161;255', |
||
316 | '0;157;255', |
||
317 | '0;153;255', |
||
318 | '0;148;255', |
||
319 | '0;144;255', |
||
320 | '0;140;255', |
||
321 | '0;136;255', |
||
322 | '0;131;255', |
||
323 | '0;127;255', |
||
324 | '0;123;255', |
||
325 | '0;119;255', |
||
326 | '0;114;255', |
||
327 | '0;110;255', |
||
328 | '0;106;255', |
||
329 | '0;102;255', |
||
330 | '0;97;255', |
||
331 | '0;93;255', |
||
332 | '0;89;255', |
||
333 | '0;84;255', |
||
334 | '0;80;255', |
||
335 | '0;76;255', |
||
336 | '0;72;255', |
||
337 | '0;67;255', |
||
338 | '0;63;255', |
||
339 | '0;59;255', |
||
340 | '0;55;255', |
||
341 | '0;51;255', |
||
342 | '0;46;255', |
||
343 | '0;42;255', |
||
344 | '0;38;255', |
||
345 | '0;33;255', |
||
346 | '0;29;255', |
||
347 | '0;25;255', |
||
348 | '0;21;255', |
||
349 | '0;16;255', |
||
350 | '0;12;255', |
||
351 | '0;8;255', |
||
352 | '0;4;255', |
||
353 | ]; |
||
485 |