ImageGuide
last analyzed

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 63
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
emptyCache() 0 1 ?
resized() 0 9 ?
thumb() 0 8 ?
dummy() 0 7 ?
1
<?php
2
3
/** @noinspection PhpTooManyParametersInspection */
4
5
declare(strict_types=1);
6
7
namespace ReliqArts\GuidedImage\Contract;
8
9
use Illuminate\Http\JsonResponse;
10
use Illuminate\Http\Request;
11
use Intervention\Image\Image;
12
13
interface ImageGuide
14
{
15
    /**
16
     * Empty skim cache.
17
     */
18
    public function emptyCache(ImageDispenser $imageDispenser): JsonResponse;
19
20
    /**
21
     * Get a resized Guided Image.
22
     *
23
     * @param mixed $width
24
     * @param mixed $height
25
     * @param mixed $aspect Keep aspect ratio?
26
     * @param mixed $upSize Allow up-size?
27
     *
28
     * @return Image|string intervention Image object or actual image url
29
     */
30
    public function resized(
31
        ImageDispenser $imageDispenser,
32
        Request $request,
33
        GuidedImage $guidedImage,
34
        $width,
35
        $height,
36
        $aspect = true,
37
        $upSize = false
38
    );
39
40
    /**
41
     * Get a thumbnail.
42
     *
43
     * @param string $method crop|fit
44
     * @param int    $width
45
     * @param int    $height
46
     *
47
     * @return Image|string intervention Image object or actual image url
48
     */
49
    public function thumb(
50
        ImageDispenser $imageDispenser,
51
        Request $request,
52
        GuidedImage $guidedImage,
53
        string $method,
54
        $width,
55
        $height
56
    );
57
58
    /**
59
     * Get dummy Guided Image.
60
     *
61
     * @param mixed $width
62
     * @param mixed $height
63
     * @param mixed $color
64
     * @param mixed $fill
65
     *
66
     * @return Image|string intervention Image object or actual image url
67
     */
68
    public function dummy(
69
        ImageDispenser $imageDispenser,
70
        $width,
71
        $height,
72
        $color = '#eefefe',
73
        $fill = false
74
    );
75
}
76