AbstractComposerTask::getOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
ccs 7
cts 7
cp 1
crap 1
rs 10
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\Composer;
13
14
use Mage\Task\AbstractTask;
15
16
/**
17
 * Abstract Composer Task
18
 *
19
 * @author Andrés Montañez <[email protected]>
20
 */
21
abstract class AbstractComposerTask extends AbstractTask
22
{
23
    /**
24
     * @return string[]
25
     */
26 29
    protected function getOptions(): array
27
    {
28 29
        $options = array_merge(
29 29
            ['path' => 'composer'],
30 29
            $this->getComposerOptions(),
31 29
            $this->runtime->getMergedOption('composer'),
32 29
            $this->options
33
        );
34
35 29
        return $options;
36
    }
37
38
    /**
39
     * @return array<string, string|int>
40
     */
41 1
    protected function getComposerOptions(): array
42
    {
43 1
        return [];
44
    }
45
}
46