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 ( 99078a...9605c1 )
by Oanh
02:49
created

GroupScenario::getTasks()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 2
Metric Value
dl 0
loc 12
ccs 10
cts 10
cp 1
rs 9.4285
cc 2
eloc 8
nc 2
nop 0
crap 2
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Task\Scenario;
9
10
use Deployer\Task\Scenario\Scenario;
11
12
class GroupScenario extends Scenario
13
{
14
    /**
15
     * @var Scenario[]
16
     */
17
    private $group;
18
19
    /**
20
     * @param Scenario[] $group
21
     */
22 4
    public function __construct(array $group)
23
    {
24 4
        parent::__construct(null);
25 4
        $this->group = $group;
26 4
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31 3
    public function getTasks()
32
    {
33 3
        $tasks = [];
34 3
        foreach ($this->group as $scenario) {
35 3
            $tasks = array_merge($tasks, $scenario->getTasks());
36 3
        }
37 3
        return array_merge(
38 3
            $this->getBefore(),
39 3
            $tasks,
40 3
            $this->getAfter()
41 3
        );
42
    }
43
}
44