Passed
Branch master (609f2f)
by Dorian
08:59
created

Release::getFormat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gnutix\Library\Model;
6
7
use DateTime;
8
use Gnutix\Library\Helper\ArrayPopulatedObject;
9
10
final class Release extends ArrayPopulatedObject
11
{
12
    protected string $title;
13
    protected Language $language;
14
    protected Editor $editor;
15
    protected Format $format;
16
    protected ?DateTime $publicationDate;
17
    protected Series $series;
18
    protected Owner $owner;
19
20
    public function getTitle(): string
21
    {
22
        return $this->title;
23
    }
24
25
    public function getLanguage(): Language
26
    {
27
        return $this->language;
28
    }
29
30
    public function getEditor(): Editor
31
    {
32
        return $this->editor;
33
    }
34
35
    public function getFormat(): Format
36
    {
37
        return $this->format;
38
    }
39
40
    public function getPublicationDate(): ?DateTime
41
    {
42
        return $this->publicationDate;
43
    }
44
45
    public function isPublished(): bool
46
    {
47
        return $this->publicationDate < new DateTime();
48
    }
49
50
    public function getSeries(): Series
51
    {
52
        return $this->series;
53
    }
54
55
    public function getOwner(): Owner
56
    {
57
        return $this->owner;
58
    }
59
}
60