Conditions | 6 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public static function determineEvangelistLevel($noOfRepo) |
||
24 | { |
||
25 | if ($noOfRepo >= 5 && $noOfRepo<= 10) { |
||
26 | $evangelistTypeMessage = "Damn It!!! Please make the world better, Oh Ye Prodigal Junior Evangelist"; |
||
27 | } else if ($noOfRepo >= 11 && $noOfRepo <= 20) { |
||
28 | $evangelistTypeMessage = "Keep Up The Good Work, I crown you Associate Evangelist"; |
||
29 | } else if ($noOfRepo >= 21) { |
||
30 | $evangelistTypeMessage = "Yeah, I crown you Senior Evangelist. Thanks for making the world a better place"; |
||
31 | } else { |
||
32 | $evangelistTypeMessage = "Fuck Off!!! Please make the world better, Oh Ye Lazy Evangelist"; |
||
33 | } |
||
34 | return $evangelistTypeMessage; |
||
35 | } |
||
36 | |||
53 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.