Completed
Pull Request — master (#506)
by Paweł
21:46 queued 11:28
created

Article::setPackage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Core Bundle.
7
 *
8
 * Copyright 2017 Sourcefabric z.ú. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2017 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\CoreBundle\Model;
18
19
use SWP\Bundle\ContentBundle\Model\Article as BaseArticle;
20
use SWP\Component\MultiTenancy\Model\OrganizationAwareTrait;
21
use SWP\Component\MultiTenancy\Model\TenantAwareTrait;
22
23
class Article extends BaseArticle implements ArticleInterface
24
{
25
    use TenantAwareTrait, OrganizationAwareTrait;
26
27
    /**
28
     * @var PackageInterface
29
     */
30
    protected $package;
31
32
    /**
33
     * @var bool
34
     */
35
    protected $isPublishedFBIA = false;
36
37
    /**
38
     * @var ArticleStatisticsInterface
39
     */
40
    protected $articleStatistics;
41
42
    /**
43
     * @var ExternalArticleInterface
44
     */
45
    protected $externalArticle;
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function setId($id)
51
    {
52
        $this->id = $id;
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function getPackage(): ?PackageInterface
59
    {
60
        return $this->package;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function setPackage(PackageInterface $package)
67
    {
68
        $this->package = $package;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function isPublishedFBIA(): bool
75
    {
76
        return $this->isPublishedFBIA;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function setPublishedFBIA(bool $isPublished)
83
    {
84
        $this->isPublishedFBIA = $isPublished;
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function getArticleStatistics(): ?ArticleStatisticsInterface
91
    {
92
        return $this->articleStatistics;
93
    }
94
95
    /**
96
     * {@inheritdoc}
97
     */
98
    public function setArticleStatistics(ArticleStatisticsInterface $articleStatistics): void
99
    {
100
        $articleStatistics->setArticle($this);
101
        $this->articleStatistics = $articleStatistics;
102
    }
103
104
    /**
105
     * {@inheritdoc}
106
     */
107
    public function getExternalArticle(): ?ExternalArticleInterface
108
    {
109
        return $this->externalArticle;
110
    }
111
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function setExternalArticle(ExternalArticleInterface $externalArticle): void
116
    {
117
        $this->externalArticle = $externalArticle;
118
    }
119
}
120