@@ -24,14 +24,14 @@ |
||
24 | 24 | * This method returns a string depending on number of user repo on Github |
25 | 25 | */ |
26 | 26 | |
27 | - public function getStatus(); |
|
27 | + public function getStatus(); |
|
28 | 28 | |
29 | - /** |
|
29 | + /** |
|
30 | 30 | * |
31 | 31 | * This method returns number of the user repo on Github |
32 | 32 | */ |
33 | 33 | |
34 | - public function getNumberOfRepos(); |
|
34 | + public function getNumberOfRepos(); |
|
35 | 35 | |
36 | 36 | |
37 | 37 | /** |
@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | * @license <https://opensource.org/license/MIT> MIT |
11 | 11 | */ |
12 | 12 | |
13 | - use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusRankingInterface; |
|
13 | + use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusRankingInterface; |
|
14 | 14 | |
15 | 15 | |
16 | - class EvangelistStatusRanking implements EvangelistStatusRankingInterface |
|
17 | - { |
|
16 | + class EvangelistStatusRanking implements EvangelistStatusRankingInterface |
|
17 | + { |
|
18 | 18 | |
19 | 19 | public function determineEvangelistLevel($noOfRepo) |
20 | 20 | { |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | return false; |
23 | 23 | } |
24 | 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 { |
|
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 | 32 | $evangelistTypeMessage = "Fuck Off!!! Please make the world better, Oh Ye Lazy Evangelist"; |
33 | 33 | } |
34 | 34 | |
35 | - return $evangelistTypeMessage; |
|
35 | + return $evangelistTypeMessage; |
|
36 | 36 | } |
37 | 37 | |
38 | - } |
|
39 | 38 | \ No newline at end of file |
39 | + } |
|
40 | 40 | \ No newline at end of file |
@@ -22,7 +22,7 @@ |
||
22 | 22 | return false; |
23 | 23 | } |
24 | 24 | |
25 | - if ($noOfRepo >= 5 && $noOfRepo<= 10) { |
|
25 | + if ($noOfRepo >= 5 && $noOfRepo <= 10) { |
|
26 | 26 | $evangelistTypeMessage = "Damn It!!! Please make the world better, Oh Ye Prodigal Junior Evangelist"; |
27 | 27 | } else if ($noOfRepo >= 11 && $noOfRepo <= 20) { |
28 | 28 | $evangelistTypeMessage = "Keep Up The Good Work, I crown you Associate Evangelist"; |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class ArgumentCheckException extends Exception |
16 | 16 | { |
17 | 17 | /** |
18 | - * This method return an instance of an exception |
|
19 | - * @param $exception |
|
20 | - * @return message |
|
21 | - */ |
|
22 | - public static function NullOfOverflowArgumentException($exception) |
|
23 | - { |
|
24 | - return new static($exception); |
|
25 | - } |
|
18 | + * This method return an instance of an exception |
|
19 | + * @param $exception |
|
20 | + * @return message |
|
21 | + */ |
|
22 | + public static function NullOfOverflowArgumentException($exception) |
|
23 | + { |
|
24 | + return new static($exception); |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class EvangelistStatusException extends Exception |
16 | 16 | { |
17 | 17 | /** |
18 | - * This method return an instance of an exception |
|
19 | - * @param message |
|
20 | - * @return message |
|
21 | - */ |
|
22 | - public static function createEvangelistStatusException($message) |
|
23 | - { |
|
24 | - return new static($message); |
|
25 | - } |
|
18 | + * This method return an instance of an exception |
|
19 | + * @param message |
|
20 | + * @return message |
|
21 | + */ |
|
22 | + public static function createEvangelistStatusException($message) |
|
23 | + { |
|
24 | + return new static($message); |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class NullNoOfReposException extends Exception |
16 | 16 | { |
17 | 17 | /** |
18 | - * This method return an instance of an exception |
|
19 | - * @param $exception |
|
20 | - * @return message |
|
21 | - */ |
|
22 | - public static function createNullReposException($exception) |
|
23 | - { |
|
24 | - return new static($exception); |
|
25 | - } |
|
18 | + * This method return an instance of an exception |
|
19 | + * @param $exception |
|
20 | + * @return message |
|
21 | + */ |
|
22 | + public static function createNullReposException($exception) |
|
23 | + { |
|
24 | + return new static($exception); |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -10,14 +10,12 @@ |
||
10 | 10 | * @license <https://opensource.org/license/MIT> MIT |
11 | 11 | */ |
12 | 12 | |
13 | -use Dotenv\Dotenv; |
|
14 | 13 | use GuzzleHttp\Client; |
15 | 14 | use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusInterface; |
16 | 15 | use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusRanking; |
17 | 16 | use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusException; |
18 | 17 | use Laztopaz\OpenSourceEvangelistStatus\NullNoOfReposException; |
19 | 18 | use Laztopaz\OpenSourceEvangelistStatus\ArgumentCheckException; |
20 | -use Exception; |
|
21 | 19 | |
22 | 20 | |
23 | 21 | class EvangelistStatus implements EvangelistStatusInterface |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $num_args = (int) func_num_args(); // get number of arguments passed to |
37 | 37 | |
38 | - if ($num_args == 0 || $num_args > 1) |
|
38 | + if ($num_args == 0 || $num_args > 1) |
|
39 | 39 | { |
40 | 40 | throw ArgumentCheckException::NullOfOverflowArgumentException("Argument missing: only one argument is allowed"); |
41 | 41 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getGitApiData() |
65 | 65 | { |
66 | - $this->response = $this->guzzleClient->get('https://api.github.com/users/'.$this->username.'?client_id='.$this->clientId .'&client_secret='.$this->clientSecret); |
|
66 | + $this->response = $this->guzzleClient->get('https://api.github.com/users/'.$this->username.'?client_id='.$this->clientId.'&client_secret='.$this->clientSecret); |
|
67 | 67 | return $this->response->getBody(); |
68 | 68 | } |
69 | 69 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $githubJson = json_decode($this->githubResponse, true); |
78 | 78 | |
79 | - if(EvangelistStatusRanking::checkForNullRepos($githubJson)) |
|
79 | + if (EvangelistStatusRanking::checkForNullRepos($githubJson)) |
|
80 | 80 | { |
81 | 81 | throw NullNoOfReposException::createNullReposException("Empty GitHub repository"); |
82 | 82 | } |
@@ -14,17 +14,17 @@ |
||
14 | 14 | interface EvangelistStatusRankingInterface |
15 | 15 | { |
16 | 16 | /** |
17 | - * This method returns the evangelist level |
|
18 | - * @param void |
|
17 | + * This method returns the evangelist level |
|
18 | + * @param void |
|
19 | 19 | * @return void |
20 | - */ |
|
21 | - public static function determineEvangelistLevel($noOfRepositories); |
|
20 | + */ |
|
21 | + public static function determineEvangelistLevel($noOfRepositories); |
|
22 | 22 | |
23 | - /** |
|
24 | - * [checkForNullRepos description] |
|
25 | - * @param array $jsonBody |
|
26 | - * @return boolean |
|
27 | - */ |
|
28 | - public static function checkForNullRepos($jsonBody); |
|
23 | + /** |
|
24 | + * [checkForNullRepos description] |
|
25 | + * @param array $jsonBody |
|
26 | + * @return boolean |
|
27 | + */ |
|
28 | + public static function checkForNullRepos($jsonBody); |
|
29 | 29 | |
30 | 30 | } |