1 | <?php |
||
18 | class EvangelistStatus |
||
19 | { |
||
20 | private $status; |
||
21 | |||
22 | public function __construct($username) |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Sets the developer's evangelist status |
||
31 | * |
||
32 | * @param mixed $repos The number of public repos a developer has on GitHub |
||
33 | */ |
||
34 | private function setStatus($repos) |
||
35 | { |
||
36 | if ($repos >= 5 && $repos <= 10) { |
||
37 | $this->status = "Prodigal Junior Evangelist"; |
||
38 | } elseif ($repos >=11 && $repos <= 20) { |
||
39 | $this->status = "Associate Evangelist"; |
||
40 | } elseif ($repos > 20) { |
||
41 | $this->status = "Senior Evangelist"; |
||
42 | } else { |
||
43 | $this->status = "You call yourself a programmer?!!"; |
||
44 | } |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Returns the developer's evangelist status |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getStatus() |
||
56 | } |
||
57 |