ArticleWasFetched   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
eloc 16
dl 0
loc 45
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A link() 0 3 1
A title() 0 3 1
A description() 0 3 1
A author() 0 3 1
A publicationDate() 0 3 1
A __construct() 0 12 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\RSS\Event;
5
6
use PersonalGalaxy\RSS\Entity\Article\{
7
    Author,
8
    Description,
9
    Title,
10
};
11
use Innmind\Url\UrlInterface;
12
use Innmind\TimeContinuum\PointInTimeInterface;
13
14
final class ArticleWasFetched
15
{
16
    private $link;
17
    private $author;
18
    private $description;
19
    private $title;
20
    private $publicationDate;
21
22 8
    public function __construct(
23
        UrlInterface $link,
24
        Author $author,
25
        Description $description,
26
        Title $title,
27
        PointInTimeInterface $publicationDate
28
    ) {
29 8
        $this->link = $link;
30 8
        $this->author = $author;
31 8
        $this->description = $description;
32 8
        $this->title = $title;
33 8
        $this->publicationDate = $publicationDate;
34 8
    }
35
36 2
    public function author(): Author
37
    {
38 2
        return $this->author;
39
    }
40
41 2
    public function link(): UrlInterface
42
    {
43 2
        return $this->link;
44
    }
45
46 2
    public function description(): Description
47
    {
48 2
        return $this->description;
49
    }
50
51 2
    public function title(): Title
52
    {
53 2
        return $this->title;
54
    }
55
56 2
    public function publicationDate(): PointInTimeInterface
57
    {
58 2
        return $this->publicationDate;
59
    }
60
}
61