ModuleOptionsFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 6 1
1
<?php
2
/**
3
 * @author Stefano Torresi (http://stefanotorresi.it)
4
 * @license See the file LICENSE.txt for copying permission.
5
 * ************************************************
6
 */
7
8
namespace Thorr\OAuth2\Factory;
9
10
use Thorr\OAuth2\Options\ModuleOptions;
11
use Zend\ServiceManager\FactoryInterface;
12
use Zend\ServiceManager\ServiceLocatorInterface;
13
14
class ModuleOptionsFactory implements FactoryInterface
15
{
16
    /**
17
     * Create service
18
     *
19
     * @param ServiceLocatorInterface $serviceLocator
20
     *
21
     * @return ModuleOptions
22
     */
23
    public function createService(ServiceLocatorInterface $serviceLocator)
24
    {
25
        $config = $serviceLocator->get('config');
26
27
        return new ModuleOptions($config['thorr_oauth']);
28
    }
29
}
30