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 ( 68e3be...d212e4 )
by Sam
158:17 queued 137:28
created

PhalconDIContainerAdapter::get()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
rs 9.4285
cc 3
eloc 7
nc 3
nop 1
1
<?php
2
3
namespace Acclimate\Container\Adapter;
4
5
use Interop\Container\ContainerInterface as AcclimateContainerInterface;
6
use Acclimate\Container\Exception\NotFoundException as AcclimateNotFoundException;
7
use Acclimate\Container\Exception\ContainerException as AcclimateContainerException;
8
use Phalcon\DiInterface as PhalconDI;
9
use Phalcon\DI\Exception as PhalconDIException;
10
11
/**
12
 * An adapter from an object implementing Phalcon\DiInterface to the standardized ContainerInterface
13
 */
14
class PhalconDIContainerAdapter implements AcclimateContainerInterface
15
{
16
    /**
17
     * @var \Phalcon\DiInterface Phalcons DI container object
18
     */
19
    private $container;
20
21
    /**
22
     * @param \Phalcon\DiInterface $container
23
     */
24
    public function __construct(PhalconDI $container)
25
    {
26
        $this->container = $container;
27
    }
28
29
    public function get($id)
30
    {
31
        try {
32
            return $this->container->get($id);
33
        } catch (PhalconDIException $prev) {
0 ignored issues
show
Bug introduced by
The class Phalcon\DI\Exception does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
34
            throw AcclimateNotFoundException::fromPrevious($id);
35
        } catch (\Exception $prev) {
36
            throw AcclimateContainerException::fromPrevious($id, $prev);
37
        }
38
    }
39
40
    public function has($id)
41
    {
42
        return isset($this->container[$id]);
43
    }
44
}
45