GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Background   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 34
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A load() 0 12 4
1
<?php
2
namespace HtImgModule\Imagine\Filter\Loader;
3
4
use Imagine\Image\ImagineInterface;
5
use HtImgModule\Imagine\Filter\Background as BackgroundFilter;
6
7
class Background extends Paste implements LoaderInterface
8
{
9
10
    /**
11
     * @var ImagineInterface
12
     */
13
    protected $imagine;
14
15
    /**
16
     * Constructor
17
     *
18
     * @param ImagineInterface $imagine
19
     */
20 2
    public function __construct(ImagineInterface $imagine)
21
    {
22 2
        $this->imagine = $imagine;
23 2
    }
24
25
    /**
26
     * {@inheritDoc}
27
     */
28 1
    public function load(array $options = [])
29
    {
30 1
        $size = (isset($options['width']) && isset($options['height']) )
31 1
            ? [$options['width'], $options['height']]
32 1
            : null;
33
34 1
        return new BackgroundFilter(
35 1
            $this->imagine,
36 1
            $size,
37 1
            isset($options['color']) ? $options['color'] : '#fff'
38
        );
39
    }
40
}
41