Completed
Pull Request — master (#9)
by Vytautas
10:39 queued 07:17
created

InterventionImageManager   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 19
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 9 1
1
<?php
2
3
namespace SvImages\ImageManager;
4
5
use Intervention\Image\ImageManager;
6
use Psr\Container\ContainerInterface;
7
use SvImages\Options\ModuleOptions;
8
9
/**
10
 * @author Vytautas Stankus <[email protected]>
11
 * @license MIT
12
 */
13
class InterventionImageManager
14
{
15
    /**
16
     * Create ImageManager
17
     *
18
     * @param ContainerInterface $container
19
     *
20
     * @return ImageManager
21
     */
22
    public function __invoke(ContainerInterface $container)
23
    {
24
        /** @var ModuleOptions $options */
25
        $options = $container->get(ModuleOptions::class);
26
27
        return new ImageManager([
28
            'driver' => $options->getDriver()
29
        ]);
30
    }
31
}
32