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
Pull Request — 1.x (#220)
by Eric
37:13 queued 34:44
created

ProcessorChain::getProcessors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Hautelook\AliceBundle package.
5
 *
6
 * (c) Baldur Rensch <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Hautelook\AliceBundle\Alice;
13
14
use Nelmio\Alice\ProcessorInterface;
15
16
/**
17
 * Calls multiple {@see Nelmio\Alice\ProcessorInterface} instances in a chain.
18
 *
19
 * This class accepts multiple instances of ProcessorInterface to be passed to the constructor.
20
 *
21
 * @author Théo FIDRY <[email protected]>
22
 */
23
class ProcessorChain
24
{
25
    /**
26
     * @var ProcessorInterface[]
27
     */
28
    private $processors;
29
30
    /**
31
     * @param ProcessorInterface[] $processors
32
     *
33
     * @throws \InvalidArgumentException
34
     */
35 45
    public function __construct(array $processors)
36
    {
37 45
        foreach ($processors as $processor) {
38 27
            if (false === $processor instanceof ProcessorInterface) {
39 3
                throw new \InvalidArgumentException('Expected a Nelmio\Alice\ProcessorInterface instance');
40
            }
41 45
        }
42
43 45
        $this->processors = $processors;
44 45
    }
45
46
    /**
47
     * @return array
48
     */
49 30
    public function getProcessors()
50
    {
51 30
        return $this->processors;
52
    }
53
}
54