Completed
Push — master ( e28e5a...6fa56b )
by Julien
02:03
created

AbstractBuildJob   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isVariableEnvironment() 0 3 1
A getDockerImageName() 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 $isVariableEnvironment;
10
11
    /** @var string */
12
    protected $dockerImageName;
13
14
    public function __construct(string $envName, string $serviceName)
15
    {
16
        $this->jobName = "build_$envName" . "_$serviceName";
17
        $this->stage = 'build';
18
    }
19
20
    /**
21
     * @return bool
22
     */
23
    public function isVariableEnvironment(): bool
24
    {
25
        return $this->isVariableEnvironment;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getDockerImageName(): string
32
    {
33
        return $this->dockerImageName;
34
    }
35
}
36