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.

ServerCollection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 36
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A add() 0 4 1
A getServers() 0 4 1
A count() 0 4 1
1
<?php
2
namespace dmank\gearman;
3
4
class ServerCollection implements \Countable
5
{
6
    /**
7
     * @var array
8
     */
9
    private $servers;
10
11 15
    public function __construct()
12
    {
13 15
        $this->servers = array();
14 15
    }
15
16
    /**
17
     * @param Server $server
18
     */
19 5
    public function add(Server $server)
20
    {
21 5
        $this->servers[] = $server;
22 5
    }
23
24
    /**
25
     * @return array
26
     */
27 11
    public function getServers()
28
    {
29 11
        return $this->servers;
30
    }
31
32
    /**
33
     * @return int
34
     */
35 1
    public function count()
36
    {
37 1
        return count($this->servers);
38
    }
39
}
40