Completed
Push — 2.0 ( 31dadf...addf4a )
by Stig
01:44
created

CropEntropy::getImagick()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Stojg\Crop;
4
5
class CropEntropy
6
{
7
    /**
8
     * @var \Imagick
9
     */
10
    protected $imagick = null;
11
12
    /**
13
     * CropEntropy constructor
14
     *
15
     * @param \Imagick|null $image
16
     */
17
    public function __construct(\Imagick $image = null)
18
    {
19
        if($image !== null) {
20
            $this->imagick = $image;
21
        } else {
22
            $this->imagick = new \Imagick();
23
        }
24
    }
25
26
    /**
27
     * @return \Imagick
28
     */
29
    public function getImagick()
30
    {
31
        return $this->imagick;
32
    }
33
}
34