Completed
Pull Request — master (#11)
by Timothy
03:13
created

SuggestEnvFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 6 1
1
<?php
2
3
namespace Abacaphiliac\ZendPhpDotEnv\Diagnostics;
4
5
use Abacaphiliac\ZendPhpDotEnv\Options\ModuleOptionsFactory;
6
use Zend\ServiceManager\FactoryInterface;
7
use Zend\ServiceManager\ServiceLocatorInterface;
8
9
class SuggestEnvFactory implements FactoryInterface
10
{
11
    /**
12
     * Create service
13
     *
14
     * @param ServiceLocatorInterface $serviceLocator
15
     * @return SuggestReadableFile
16
     * @throws \Zend\Stdlib\Exception\InvalidArgumentException
17
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
18
     */
19
    public function createService(ServiceLocatorInterface $serviceLocator)
20
    {
21
        $files = ModuleOptionsFactory::getFiles($serviceLocator);
22
23
        return new SuggestReadableFile($files);
24
    }
25
}
26