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 — master ( 103a86...2f9008 )
by Bram
07:42 queued 05:18
created

CacheStorageFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
ccs 0
cts 0
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
crap 2
1
<?php
2
/**
3
 * @author Bram Gerritsen [email protected]
4
 * @copyright (c) Bram Gerritsen 2013
5
 * @license http://opensource.org/licenses/mit-license.php
6
 */
7
8
namespace StrokerCache\Factory;
9
10
use Interop\Container\ContainerInterface;
11
use Interop\Container\Exception\ContainerException;
12
use StrokerCache\Options\ModuleOptions;
13
use Zend\Cache\StorageFactory;
14
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
15
use Zend\ServiceManager\Exception\ServiceNotFoundException;
16
use Zend\ServiceManager\FactoryInterface;
17
use Zend\ServiceManager\ServiceLocatorInterface;
18
19
class CacheStorageFactory implements FactoryInterface
1 ignored issue
show
Deprecated Code introduced by
The interface Zend\ServiceManager\FactoryInterface has been deprecated with message: Use Zend\ServiceManager\Factory\FactoryInterface instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
20
{
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function createService(ServiceLocatorInterface $serviceLocator)
25
    {
26
        return $this($serviceLocator, StorageFactory::class);
27
    }
28
29
    /**
30
     * Create an object
31
     *
32
     * @param  ContainerInterface $container
33
     * @param  string $requestedName
34
     * @param  null|array $options
35
     * @return object
36
     * @throws ServiceNotFoundException if unable to resolve the service.
37
     * @throws ServiceNotCreatedException if an exception is raised when
38
     *     creating a service.
39
     * @throws ContainerException if any other error occurs
40
     */
41
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
42
    {
43
        /** @var $options ModuleOptions */
44
        $options = $container->get(ModuleOptions::class);
45
        $adapterOptions = ['adapter' => $options->getStorageAdapter()];
46
47
        return StorageFactory::factory($adapterOptions);
48
    }
49
}
50