JobException::unknownDeployType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TheAentMachine\AentGitLabCI\Exception;
4
5
use TheAentMachine\Exception\AenthillException;
6
7
final class JobException extends AenthillException
8
{
9
    /**
10
     * @param string $identifier
11
     * @return self
12
     */
13
    public static function cannotAddOnly(string $identifier): self
14
    {
15
        return new self("\"$identifier\" is already referenced in \"except\" section");
16
    }
17
18
    /**
19
     * @param string $identifier
20
     * @return self
21
     */
22
    public static function cannotAddExcept(string $identifier): self
23
    {
24
        return new self("\"$identifier\" is already referenced in \"only\" section");
25
    }
26
27
    /**
28
     * @return self
29
     */
30
    public static function branchIsNull(): self
31
    {
32
        return new self('"only" section cannot have a null entry');
33
    }
34
35
    /**
36
     * @param string $deployType
37
     * @return self
38
     */
39
    public static function unknownDeployType(string $deployType): self
40
    {
41
        return new self("\"$deployType\" is not a valid deploy type.");
42
    }
43
}
44