Completed
Push — master ( 3460d4...501fc3 )
by Paweł
76:02 queued 29:07
created

ImageRendition::setHeight()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Content Bundle.
5
 *
6
 * Copyright 2016 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 2016 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\ContentBundle\Model;
16
17
use SWP\Component\Storage\Model\PersistableInterface;
18
19
/**
20
 * ImageRendition represents media which belongs to Article.
21
 */
22
class ImageRendition implements ImageRenditionInterface, PersistableInterface
23
{
24
    /**
25
     * @var string
26
     */
27
    protected $width;
28
29
    /**
30
     * @var string
31
     */
32
    protected $height;
33
34
    /**
35
     * @var string
36
     */
37
    protected $name;
38
39
    /**
40
     * @var int
41
     */
42
    protected $id;
43
44
    /**
45
     * @var ImageInterface
46
     */
47
    protected $image;
48
49
    /**
50
     * @var ArticleMediaInterface
51
     */
52
    protected $media;
53
54
    /**
55
     * @return ArticleMediaInterface
56
     */
57
    public function getMedia(): ArticleMediaInterface
58
    {
59
        return $this->media;
60
    }
61
62
    /**
63
     * @param ArticleMediaInterface $media
64
     */
65
    public function setMedia(ArticleMediaInterface $media)
66
    {
67
        $this->media = $media;
68
    }
69
70
    /**
71
     * @return ImageInterface
72
     */
73
    public function getImage()
74
    {
75
        return $this->image;
76
    }
77
78
    /**
79
     * @param ImageInterface $image
80
     */
81
    public function setImage($image)
82
    {
83
        $this->image = $image;
84
    }
85
86
    /**
87
     * @return int
88
     */
89
    public function getId(): int
90
    {
91
        return $this->id;
92
    }
93
94
    /**
95
     * @param int $id
96
     */
97
    public function setId(int $id)
98
    {
99
        $this->id = $id;
100
    }
101
102
    /**
103
     * {@inheritdoc}
104
     */
105
    public function getWidth()
106
    {
107
        return $this->width;
108
    }
109
110
    /**
111
     * @param string $width
112
     *
113
     * @return ImageRendition
114
     */
115
    public function setWidth($width)
116
    {
117
        $this->width = $width;
118
119
        return $this;
120
    }
121
122
    /**
123
     * {@inheritdoc}
124
     */
125
    public function getHeight()
126
    {
127
        return $this->height;
128
    }
129
130
    /**
131
     * @param string $height
132
     *
133
     * @return ImageRendition
134
     */
135
    public function setHeight($height)
136
    {
137
        $this->height = $height;
138
139
        return $this;
140
    }
141
142
    /**
143
     * {@inheritdoc}
144
     */
145
    public function getName()
146
    {
147
        return $this->name;
148
    }
149
150
    /**
151
     * @param string $name
152
     *
153
     * @return ImageRendition
154
     */
155
    public function setName($name)
156
    {
157
        $this->name = $name;
158
159
        return $this;
160
    }
161
}
162