1 | <?php |
||
16 | class EvangelistStatusRanking implements EvangelistStatusRankingInterface |
||
17 | { |
||
18 | /** |
||
19 | * This method ranks GitHub users based on the number of repositories they have |
||
20 | * @param int $noOfRepo |
||
21 | * @return String $evangelistTypeMessage |
||
22 | */ |
||
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 | |||
37 | /** |
||
38 | * This method check for null repos |
||
39 | * @param array $arrayResponse |
||
40 | * @return boolean |
||
41 | */ |
||
42 | public static function checkForNullRepos($arrayResponse) |
||
43 | { |
||
44 | if ($arrayResponse["message"] == "Not Found") { |
||
45 | return true; |
||
46 | } |
||
47 | } |
||
48 | <<<<<<< HEAD |
||
49 | |||
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.