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.

GroupTask   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 38
c 0
b 0
f 0
rs 10
ccs 6
cts 8
cp 0.75
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getGroup() 0 3 1
A setGroup() 0 3 1
A __construct() 0 4 1
A run() 0 4 2
1
<?php
2
3
declare(strict_types=1);
4
5
/* (c) Anton Medvedev <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Deployer\Task;
12
13
use function Deployer\invoke;
14
15
class GroupTask extends Task
16
{
17
    /**
18
     * List of tasks.
19
     *
20
     * @var string[]
21
     */
22
    private $group;
23 10
24
    /**
25 10
     * @param string[] $group
26 10
     */
27 10
    public function __construct(string $name, array $group)
28
    {
29
        parent::__construct($name);
30
        $this->group = $group;
31
    }
32
33
    public function run(Context $context): void
34
    {
35
        foreach ($this->group as $item) {
36
            invoke($item);
37
        }
38
    }
39 5
40
    /**
41 5
     * List of dependent tasks names
42
     *
43
     * @return string[]
44
     */
45
    public function getGroup(): array
46
    {
47
        return $this->group;
48
    }
49
50
    public function setGroup(array $group): void
51
    {
52
        $this->group = $group;
53
    }
54
}
55