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 ( d212e4...d18b11 )
by Sam
02:12
created

GuzzleContainerAdapter::has()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Acclimate\Container\Adapter;
4
5
use Acclimate\Container\Exception\ContainerException as AcclimateContainerException;
6
use Acclimate\Container\Exception\NotFoundException as AcclimateNotFoundException;
7
use Guzzle\Service\Builder\ServiceBuilderInterface as GuzzleContainerInterface;
8
use Guzzle\Service\Exception\ServiceNotFoundException as GuzzleNotFoundException;
9
use Interop\Container\ContainerInterface as AcclimateContainerInterface;
10
11
/**
12
 * An adapter from a Guzzle ServiceBuilder to the standardized ContainerInterface
13
 */
14
class GuzzleContainerAdapter implements AcclimateContainerInterface
15
{
16
    /**
17
     * @var GuzzleContainerInterface A Guzzle ServiceBuilder
18
     */
19
    private $container;
20
21
    /**
22
     * @param GuzzleContainerInterface $container A Guzzle ServiceBuilder
23
     */
24
    public function __construct(GuzzleContainerInterface $container)
25
    {
26
        $this->container = $container;
27
    }
28
29
    public function get($id)
30
    {
31
        try {
32
            return $this->container->get($id);
33
        } catch (GuzzleNotFoundException $prev) {
0 ignored issues
show
Bug introduced by
The class Guzzle\Service\Exception\ServiceNotFoundException 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, $prev);
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