Completed
Push — master ( f351fc...15d6c3 )
by Paweł
18s queued 11s
created

MediaAwareTrait::setMedia()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Content Bundle.
5
 *
6
 * Copyright 2017 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2017 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\ContentBundle\Model;
16
17
use DateTime;
18
use Doctrine\Common\Collections\Collection;
19
20
trait MediaAwareTrait
21
{
22
    protected $media;
23
24
    protected $featureMedia;
25
26
    protected $mediaUpdatedAt;
27
28
    public function getMedia(): Collection
29
    {
30
        return $this->media;
31
    }
32
33
    public function setMedia(Collection $media): void
34
    {
35
        $this->media = $media;
36
    }
37
38
    public function getFeatureMedia(): ?ArticleMediaInterface
39
    {
40
        return $this->featureMedia;
41
    }
42
43
    public function setFeatureMedia(ArticleMediaInterface $featureMedia = null): void
44
    {
45
        $this->featureMedia = $featureMedia;
46
    }
47
48
    public function getMediaUpdatedAt(): ?DateTime
49
    {
50
        return $this->mediaUpdatedAt;
51
    }
52
53
    public function setMediaUpdatedAt(DateTime $mediaUpdatedAt): void
54
    {
55
        $this->mediaUpdatedAt = $mediaUpdatedAt;
56
    }
57
}
58