Completed
Pull Request — master (#732)
by 12345
03:41
created

Binary   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
dl 0
loc 53
wmc 4
lcom 0
cbo 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getContent() 0 4 1
A getMimeType() 0 4 1
A getFormat() 0 4 1
A __construct() 0 6 1
1
<?php
2
3
namespace Liip\ImagineBundle\Model;
4
5
use Liip\ImagineBundle\Binary\BinaryInterface;
6
7
class Binary implements BinaryInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $content;
13
14
    /**
15
     * @var string
16
     */
17
    protected $mimeType;
18
19
    /**
20
     * @var string
21
     */
22
    protected $format;
23
24
    /**
25
     * @param string $content
26
     * @param string $mimeType
27
     * @param string $format
28
     */
29
    public function __construct($content, $mimeType, $format = null)
30
    {
31
        $this->content = $content;
32
        $this->mimeType = $mimeType;
33
        $this->format = $format;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getContent()
40
    {
41
        return $this->content;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getMimeType()
48
    {
49
        return $this->mimeType;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getFormat()
56
    {
57
        return $this->format;
58
    }
59
}
60