Completed
Push — master ( 5982d9...78edbd )
by Renato
08:50
created

Imagine::isImage()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 2
nc 3
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace NwLaravel\FileStorage;
4
5
interface Imagine
6
{
7
    /**
8
     * Filesize
9
     *
10
     * @return int
11
     */
12
    public function filesize();
13
14
    /**
15
     * Define Resize
16
     *
17
     * @param int     $width
18
     * @param int     $height
19
     * @param boolean $force
20
     *
21
     * @return Imagine
22
     */
23
    public function resize($width, $height, $force = false);
24
25
    /**
26 17
     * Opacity
27
     *
28 17
     * @return Imagine
29 17
     */
30 17
    public function opacity($opacity);
31
32
    /**
33
     * Watermark
34
     *
35
     * @param string  $path
36
     * @param integer $opacity
37
     *
38
     * @return Imagine
39
     */
40
    public function watermark($path, $position = 'center', $opacity = null);
41 5
42
    /**
43 5
     * Crop
44 5
     *
45
     * @param integer $width
46
     * @param integer $height
47 5
     * @param integer $x
48
     * @param integer $y
49 4
     *
50
     * @return binary
51 1
     */
52 1
    public function crop($width, $height, $x, $y);
53 1
54 1
    /**
55
     * Encode
56 4
     *
57 4
     * @param string  $format
58 4
     * @param integer $quality
59 4
     *
60
     * @return binary
61 5
     */
62
    public function encode($format = null, $quality = null);
63
64
    /**
65
     * Save
66
     *
67
     * @param string  $path
68
     * @param integer $quality
69 3
     *
70
     * @return binary
71 3
     */
72
    public function save($path, $quality = null);
73
}