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

SuggestEnvFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 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