WarmImageCache   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A isForce() 0 3 1
A getPath() 0 3 1
A getFilters() 0 3 1
1
<?php
2
3
namespace App\Message;
4
5
// Basically https://github.com/liip/LiipImagineBundle/issues/1193#issuecomment-793849806
6
class WarmImageCache {
7
    /** @var string */
8
    private $pathToImage;
9
    /** @var array */
10
    private $filters;
11
    /** @var bool  */
12
    private $force = false;
13
    /**
14
     * WarmImageCache constructor.
15
     *
16
     */
17
    public function __construct(string $pathToImage, array $filters = [], bool $force = false)
18
    {
19
        $this->pathToImage = $pathToImage;
20
        $this->filters = $filters;
21
        $this->force = $force;
22
    }
23
24
    public function isForce(): bool
25
    {
26
        return $this->force;
27
    }
28
29
    /**
30
     * @return mixed
31
     */
32
    public function getPath()
33
    {
34
        return $this->pathToImage;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getFilters(): array
41
    {
42
        return $this->filters;
43
    }
44
}