Completed
Push — master ( af09d7...7599bb )
by Dorian
02:06
created

Release   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 1
dl 0
loc 87
rs 10
c 0
b 0
f 0
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;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
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