GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ModuleOptionsFactory::createService()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
cc 3
eloc 6
nc 4
nop 1
1
<?php
2
/**
3
 * Description
4
 *
5
 * @category  StrokerForm
6
 * @package   StrokerForm\Options
7
 * @copyright 2012 Bram Gerritsen
8
 * @version   SVN: $Id$
9
 */
10
11
namespace StrokerForm\Factory;
12
13
use RuntimeException;
14
use StrokerForm\Options\ModuleOptions;
15
use Zend\ServiceManager\FactoryInterface;
16
use Zend\ServiceManager\ServiceLocatorInterface;
17
18
class ModuleOptionsFactory implements FactoryInterface
19
{
20
    /**
21
     * Create service
22
     *
23
     * @param  ServiceLocatorInterface $serviceLocator
24
     *
25
     * @return mixed
26
     */
27
    public function createService(ServiceLocatorInterface $serviceLocator)
28
    {
29
        $options = $serviceLocator->get('Config');
30
        $options = isset($options['stroker_form']) ? $options['stroker_form'] : null;
31
32
        if (null === $options) {
33
            throw new RuntimeException('Configuration with key stroker_form not found');
34
        }
35
36
        return new ModuleOptions($options);
37
    }
38
}
39