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

Post::setSlug()   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 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\OutputChannel\External\Wordpress;
18
19
class Post implements PostInterface
20
{
21
    /**
22
     * @var string
23
     */
24
    protected $title;
25
26
    /**
27
     * @var string
28
     */
29
    protected $content;
30
31
    /**
32
     * @var string
33
     */
34
    protected $status;
35
36
    /**
37
     * @var string
38
     */
39
    protected $slug;
40
41
    /**
42
     * @var string
43
     */
44
    protected $type;
45
46
    /**
47
     * @var array
48
     */
49
    protected $tags;
50
51
    /**
52
     * @var int|null
53
     */
54
    protected $featuredMedia;
55
56
    /**
57
     * Post constructor.
58
     */
59
    public function __construct()
60
    {
61
        $this->setType(PostInterface::TYPE_STANDARD);
62
        $this->setTags([]);
63
    }
64
65
    /**
66
     * {@inheritdoc}
67
     */
68
    public function getTitle(): string
69
    {
70
        return $this->title;
71
    }
72
73
    /**
74
     * {@inheritdoc}
75
     */
76
    public function setTitle(string $title): void
77
    {
78
        $this->title = $title;
79
    }
80
81
    /**
82
     * {@inheritdoc}
83
     */
84
    public function getContent(): string
85
    {
86
        return $this->content;
87
    }
88
89
    /**
90
     * {@inheritdoc}
91
     */
92
    public function setContent(string $content): void
93
    {
94
        $this->content = $content;
95
    }
96
97
    /**
98
     * {@inheritdoc}
99
     */
100
    public function getStatus(): string
101
    {
102
        return $this->status;
103
    }
104
105
    /**
106
     * {@inheritdoc}
107
     */
108
    public function setStatus(string $status): void
109
    {
110
        $this->status = $status;
111
    }
112
113
    /**
114
     * {@inheritdoc}
115
     */
116
    public function getSlug(): string
117
    {
118
        return $this->slug;
119
    }
120
121
    /**
122
     * {@inheritdoc}
123
     */
124
    public function setSlug(string $slug): void
125
    {
126
        $this->slug = $slug;
127
    }
128
129
    /**
130
     * {@inheritdoc}
131
     */
132
    public function getType(): string
133
    {
134
        return $this->type;
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140
    public function setType(string $type): void
141
    {
142
        $this->type = $type;
143
    }
144
145
    /**
146
     * {@inheritdoc}
147
     */
148
    public function getFeaturedMedia(): ?int
149
    {
150
        return $this->featuredMedia;
151
    }
152
153
    /**
154
     * {@inheritdoc}
155
     */
156
    public function setFeaturedMedia(?int $featuredMedia): void
157
    {
158
        $this->featuredMedia = $featuredMedia;
159
    }
160
161
    /**
162
     * {@inheritdoc}
163
     */
164
    public function getTags(): array
165
    {
166
        return $this->tags;
167
    }
168
169
    /**
170
     * {@inheritdoc}
171
     */
172
    public function setTags(array $tags): void
173
    {
174
        $this->tags = $tags;
175
    }
176
}
177