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.

EntryToObjectsControllerPluginFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 17 2
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