Completed
Pull Request — master (#128)
by Fabien
10:52
created

ProfileStack   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 45
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getClient() 0 4 1
A addProfile() 0 4 1
A getProfiles() 0 4 1
1
<?php
2
3
namespace Http\HttplugBundle\Collector;
4
5
class ProfileStack
6
{
7
    /**
8
     * @var string
9
     */
10
    private $client;
11
12
    /**
13
     * @var Profile[]
14
     */
15
    private $profiles;
16
17
    /**
18
     * @param string $client
19
     */
20
    public function __construct($client)
21
    {
22
        $this->client = $client;
23
        $this->profiles = [];
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getClient()
30
    {
31
        return $this->client;
32
    }
33
34
    /**
35
     * @param Profile $profile
36
     */
37
    public function addProfile(Profile $profile)
38
    {
39
        $this->profiles[] = $profile;
40
    }
41
42
    /**
43
     * @return Profile[]
44
     */
45
    public function getProfiles()
46
    {
47
        return $this->profiles;
48
    }
49
}
50