Completed
Push — master ( 4fe608...5ceeaf )
by Jindun
12s
created

AbstractBuildJob   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDockerImageName() 0 3 1
A isSingleBranch() 0 3 1
1
<?php
2
3
4
namespace TheAentMachine\AentGitLabCI\GitLabCI\Job;
5
6
abstract class AbstractBuildJob extends AbstractJob
7
{
8
    /** @var bool */
9
    protected $isSingleBranch;
10
    /** @var string */
11
    protected $dockerImageName;
12
13
    public function __construct(string $envName, string $serviceName)
14
    {
15
        $this->jobName = "build_$envName" . "_$serviceName";
16
        $this->stage = 'build';
17
    }
18
19
    public function isSingleBranch(): bool
20
    {
21
        return $this->isSingleBranch;
22
    }
23
24
    public function getDockerImageName(): string
25
    {
26
        return $this->dockerImageName;
27
    }
28
}
29