Completed
Push — master ( 90ccc1...22512f )
by Kamil
35:43
created

PageMetadata::setTwitter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
dl 0
loc 4
rs 10
c 2
b 1
f 1
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Component\Metadata\Model\Custom;
13
14
use Sylius\Component\Metadata\Model\AbstractMetadata;
15
use Sylius\Component\Metadata\Model\Twitter\CardInterface;
16
17
/**
18
 * @author Kamil Kokot <[email protected]>
19
 */
20
class PageMetadata extends AbstractMetadata implements PageMetadataInterface
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $title;
26
27
    /**
28
     * @var string
29
     */
30
    protected $description;
31
32
    /**
33
     * @var string[]
34
     */
35
    protected $keywords = [];
36
37
    /**
38
     * @var string
39
     */
40
    protected $charset = 'UTF-8';
41
42
    /**
43
     * @var CardInterface
44
     */
45
    protected $twitter;
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getTitle()
51
    {
52
        return $this->title;
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function setTitle($title)
59
    {
60
        $this->title = $title;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function getDescription()
67
    {
68
        return $this->description;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function setDescription($description)
75
    {
76
        $this->description = $description;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function getKeywords()
83
    {
84
        return $this->keywords;
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function setKeywords(array $keywords)
91
    {
92
        $this->keywords = $keywords;
93
    }
94
95
    /**
96
     * {@inheritdoc}
97
     */
98
    public function getCharset()
99
    {
100
        return $this->charset;
101
    }
102
103
    /**
104
     * {@inheritdoc}
105
     */
106
    public function setCharset($charset)
107
    {
108
        $this->charset = $charset;
109
    }
110
111
    /**
112
     * {@inheritdoc}
113
     */
114
    public function getTwitter()
115
    {
116
        return $this->twitter;
117
    }
118
119
    /**
120
     * {@inheritdoc}
121
     */
122
    public function setTwitter(CardInterface $twitter = null)
123
    {
124
        $this->twitter = $twitter;
125
    }
126
}
127