Completed
Push — master ( 0ca8d8...94fc1e )
by Daniel
12:22
created

Image   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0
Metric Value
dl 0
loc 27
wmc 2
lcom 1
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMimeType() 0 4 1
1
<?php
2
/**
3
 * This file is part of the Magickly project.
4
 *
5
 * @author Daniel Schröder <[email protected]>
6
 */
7
8
namespace GravityMedia\Magickly\Imagick;
9
10
use GravityMedia\Magickly\ImageInterface;
11
12
/**
13
 * The Image class.
14
 *
15
 * @package GravityMedia\Magickly\Imagick
16
 */
17
class Image implements ImageInterface
18
{
19
    /**
20
     * @var \Imagick
21
     */
22
    protected $imagick;
23
24
    /**
25
     * Create image object.
26
     *
27
     * @param \Imagick $imagick
28
     */
29
    public function __construct(\Imagick $imagick)
30
    {
31
        $this->imagick = $imagick;
32
    }
33
34
    /**
35
     * Get mime type.
36
     *
37
     * @return string
38
     */
39
    public function getMimeType()
40
    {
41
        return $this->imagick->getImageMimeType();
42
    }
43
}
44