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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 32
ccs 14
cts 14
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTasks() 0 12 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