ArticleWasFetched::publicationDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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