Passed
Branch master (3fb2a1)
by Andrés
02:45
created

AbstractSymfonyTask   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 23
ccs 9
cts 9
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOptions() 0 10 1
A getSymfonyOptions() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Magallanes package.
5
 *
6
 * (c) Andrés Montañez <[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 Mage\Task\BuiltIn\Symfony;
13
14
use Mage\Task\AbstractTask;
15
16
/**
17
 * Abstract Symfony Task
18
 *
19
 * @author Andrés Montañez <[email protected]>
20
 */
21
abstract class AbstractSymfonyTask extends AbstractTask
22
{
23
    /**
24
     * @return array<string, string>
25
     */
26 20
    protected function getOptions(): array
27
    {
28 20
        $options = array_merge(
29 20
            ['console' => 'bin/console', 'env' => 'dev', 'flags' => ''],
30 20
            $this->getSymfonyOptions(),
31 20
            $this->runtime->getMergedOption('symfony'),
32 20
            $this->options
33
        );
34
35 20
        return $options;
36
    }
37
38
    /**
39
     * @return array<string, string|null>
40
     */
41 19
    protected function getSymfonyOptions(): array
42
    {
43 19
        return [];
44
    }
45
}
46