SubscriptionWasAdded   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
eloc 13
dl 0
loc 37
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A identity() 0 3 1
A name() 0 3 1
A user() 0 3 1
A location() 0 3 1
A __construct() 0 10 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\RSS\Event;
5
6
use PersonalGalaxy\RSS\Entity\Subscription\{
7
    Identity,
8
    User,
9
    Name,
10
};
11
use Innmind\Url\UrlInterface;
12
13
final class SubscriptionWasAdded
14
{
15
    private $identity;
16
    private $user;
17
    private $name;
18
    private $location;
19
20 6
    public function __construct(
21
        Identity $identity,
22
        User $user,
23
        Name $name,
24
        UrlInterface $location
25
    ) {
26 6
        $this->identity = $identity;
27 6
        $this->user = $user;
28 6
        $this->name = $name;
29 6
        $this->location = $location;
30 6
    }
31
32 2
    public function identity(): Identity
33
    {
34 2
        return $this->identity;
35
    }
36
37 2
    public function user(): User
38
    {
39 2
        return $this->user;
40
    }
41
42 2
    public function name(): Name
43
    {
44 2
        return $this->name;
45
    }
46
47 2
    public function location(): UrlInterface
48
    {
49 2
        return $this->location;
50
    }
51
}
52