AbstractBuildJob   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

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

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
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