GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — evangelist ( 77050a...4d3f68 )
by Temitope
03:02 queued 16s
created

EvangelistStatusRanking   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 11
Bugs 2 Features 1
Metric Value
wmc 8
c 11
b 2
f 1
lcom 0
cbo 0
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A checkForNullRepos() 0 6 2
B determineEvangelistLevel() 0 13 6
1
<?php
2
3
namespace Laztopaz\OpenSourceEvangelistStatus;
4
5
/**
6
 *
7
 * EvangelistStatus class
8
 * 
9
 * @package  Laztopaz\OpenSourceEvangelistStatus
10
 * @author   Temitope Olotin <[email protected]>
11
 * @license  <https://opensource.org/license/MIT> MIT
12
 */
13
14
 use Laztopaz\OpenSourceEvangelistStatus\EvangelistStatusRankingInterface;
15
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
49
 }
50