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.
Completed
Push — dev ( b67b4d...eed2d4 )
by Андрей
04:42
created

WorkflowToolsFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 15 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\Service;
7
8
use OldTown\Workflow\ZF2\Toolkit\EntryToObjects\EntryToObjectsService;
9
use Zend\ServiceManager\FactoryInterface;
10
use Zend\ServiceManager\ServiceLocatorInterface;
11
use OldTown\Workflow\ZF2\ServiceEngine\Workflow;
12
13
/**
14
 * Class WorkflowToolsFactory
15
 *
16
 * @package OldTown\Workflow\ZF2\Toolkit\Service
17
 */
18
class WorkflowToolsFactory implements FactoryInterface
19
{
20
    /**
21
     * @param ServiceLocatorInterface $serviceLocator
22
     *
23
     * @return WorkflowTools
24
     *
25
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
26
     */
27
    public function createService(ServiceLocatorInterface $serviceLocator)
28
    {
29
        /** @var EntryToObjectsService $entryToObjectsService */
30
        $entryToObjectsService = $serviceLocator->get(EntryToObjectsService::class);
31
32
        /** @var Workflow $workflowService */
33
        $workflowService = $serviceLocator->get(Workflow::class);
34
35
        $initOptions = [
36
            'entryToObjectsService' => $entryToObjectsService,
37
            'workflowService'       => $workflowService
38
        ];
39
40
        return new WorkflowTools($initOptions);
41
    }
42
}
43