AbstractBuildJob::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace TheAentMachine\AentGitLabCI\GitLabCI\Job;
4
5
abstract class AbstractBuildJob extends AbstractJob
6
{
7
    /** @var bool */
8
    protected $isSingleBranch;
9
10
    /** @var string */
11
    protected $dockerImageName;
12
13
    /**
14
     * AbstractBuildJob constructor.
15
     * @param string $envName
16
     * @param string $serviceName
17
     */
18
    public function __construct(string $envName, string $serviceName)
19
    {
20
        $this->jobName = "build_$envName" . "_$serviceName";
21
        $this->stage = 'build';
22
    }
23
24
    /**
25
     * @return bool
26
     */
27
    public function isSingleBranch(): bool
28
    {
29
        return $this->isSingleBranch;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getDockerImageName(): string
36
    {
37
        return $this->dockerImageName;
38
    }
39
}
40