InterventionImageManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

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

1 Method

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