TwitterMediaSize::getResize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Twitter\Object;
4
5
use Twitter\TwitterSerializable;
6
7
class TwitterMediaSize implements TwitterSerializable
8
{
9
    /**
10
     * @var string
11
     */
12
    private $name;
13
14
    /**
15
     * @var int
16
     */
17
    private $width;
18
19
    /**
20
     * @var int
21
     */
22
    private $height;
23
24
    /**
25
     * @var boolean
26
     */
27
    private $resize;
28
29
    /**
30
     * Constructor.
31
     */
32 9
    public function __construct()
33
    {
34 9
    }
35
36
    /**
37
     * @return int
38
     */
39 9
    public function getHeight()
40
    {
41 9
        return $this->height;
42
    }
43
44
    /**
45
     * @return string
46
     */
47 6
    public function getName()
48
    {
49 6
        return $this->name;
50
    }
51
52
    /**
53
     * @return string
54
     */
55 9
    public function getResize()
56
    {
57 9
        return $this->resize;
58
    }
59
60
    /**
61
     * @return int
62
     */
63 9
    public function getWidth()
64
    {
65 9
        return $this->width;
66
    }
67
68
    /**
69
     * Static constructor.
70
     *
71
     * @param string  $name
72
     * @param int     $width
73
     * @param int     $height
74
     * @param boolean $resize
75
     *
76
     * @return TwitterMediaSize
77
     */
78 9
    public static function create($name, $width, $height, $resize)
79
    {
80 9
        $obj = new self();
81
82 9
        $obj->height = $height;
83 9
        $obj->name = $name;
84 9
        $obj->resize = $resize;
85 9
        $obj->width = $width;
86
87 9
        return $obj;
88
    }
89
}
90