Completed
Push — master ( 8d3dbf...7592af )
by Paweł
62:36
created

FacebookInstantArticlesFeed::isDevelopment()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 6
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 2016 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 2016 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\CoreBundle\Model;
18
19
use SWP\Bundle\FacebookInstantArticlesBundle\Model\PageInterface;
20
use SWP\Component\Common\Model\TimestampableTrait;
21
use SWP\Component\MultiTenancy\Model\TenantAwareInterface;
22
use SWP\Component\MultiTenancy\Model\TenantAwareTrait;
23
24
class FacebookInstantArticlesFeed implements TenantAwareInterface, FacebookInstantArticlesFeedInterface
25
{
26
    use TenantAwareTrait, TimestampableTrait;
27
28
    /**
29
     * @var int
30
     */
31
    protected $id;
32
33
    /**
34
     * @var ContentListInterface
35
     */
36
    protected $contentBucket;
37
38
    /**
39
     * @var PageInterface
40
     */
41
    protected $facebookPage;
42
43
    /**
44
     * @var int
45
     */
46
    protected $mode;
47
48
    /**
49
     * @return string
50
     */
51
    public function getId()
52
    {
53
        return $this->id;
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59 2
    public function getContentBucket()
60
    {
61 2
        return $this->contentBucket;
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67 2
    public function setContentBucket(ContentListInterface $contentBucket)
68
    {
69 2
        $this->contentBucket = $contentBucket;
70 2
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75 2
    public function getFacebookPage()
76
    {
77 2
        return $this->facebookPage;
78
    }
79
80
    /**
81
     * {@inheritdoc}
82
     */
83 2
    public function setFacebookPage(PageInterface $facebookPage)
84
    {
85 2
        $this->facebookPage = $facebookPage;
86 2
    }
87
88
    /**
89
     * {@inheritdoc}
90
     */
91 2
    public function getMode()
92
    {
93 2
        return $this->mode;
94
    }
95
96
    /**
97
     * {@inheritdoc}
98
     */
99 2
    public function setMode($mode)
100
    {
101 2
        $this->mode = $mode;
102 2
    }
103
104
    /**
105
     * {@inheritdoc}
106
     */
107
    public function isDevelopment()
108
    {
109
        if (FacebookInstantArticlesFeedInterface::FEED_MODE_DEVELOPMENT === $this->mode) {
110
            return true;
111
        }
112
113
        return false;
114
    }
115
}
116