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.

createService()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 2
eloc 8
nc 2
nop 1
1
<?php
2
/**
3
 * @link    https://github.com/old-town/workflow-zf2-toolkit
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Toolkit\EntryToObjects;
7
8
use Zend\ServiceManager\AbstractPluginManager;
9
use Zend\ServiceManager\FactoryInterface;
10
use Zend\ServiceManager\ServiceLocatorInterface;
11
12
/**
13
 * Class EntryToObjectsControllerPluginFactory
14
 *
15
 * @package OldTown\Workflow\ZF2\Toolkit\EntryToObjects
16
 */
17
class EntryToObjectsControllerPluginFactory implements FactoryInterface
18
{
19
    /**
20
     * @param ServiceLocatorInterface $serviceLocator
21
     *
22
     * @return mixed|void
23
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
24
     */
25
    public function createService(ServiceLocatorInterface $serviceLocator)
26
    {
27
        $appServiceLocator = $serviceLocator;
28
        if ($serviceLocator instanceof AbstractPluginManager) {
29
            $appServiceLocator = $serviceLocator->getServiceLocator();
30
        }
31
32
33
        /** @var EntryToObjectsService $entryToObjectsService */
34
        $entryToObjectsService = $appServiceLocator->get(EntryToObjectsService::class);
35
36
        $options = [
37
            'entryToObjectsService' => $entryToObjectsService
38
        ];
39
40
        return new EntryToObjectsControllerPlugin($options);
41
    }
42
}
43