Passed
Push — master ( 37f519...5d9444 )
by Jakub
01:15
created

DefaultTag   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A defaultTag() 0 3 2
A defaultExcludeTag() 0 3 2
1
<?php declare(strict_types=1);
2
3
namespace Zalas\Toolbox\Cli\Command;
4
5
trait DefaultTag
6
{
7 34
    private function defaultExcludeTag(): array
8
    {
9 34
        return \getenv('TOOLBOX_EXCLUDED_TAGS') ? \explode(',', \getenv('TOOLBOX_EXCLUDED_TAGS')) : [\sprintf('exclude-php:%s.%s', PHP_MAJOR_VERSION, PHP_MINOR_VERSION)];
10
    }
11
12 34
    private function defaultTag(): array
13
    {
14 34
        return \getenv('TOOLBOX_TAGS') ? \explode(',', \getenv('TOOLBOX_TAGS')) : [];
15
    }
16
}
17