Passed
Pull Request — master (#7)
by
unknown
02:29
created

VolumeTypeException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace TheAentMachine\AentDockerCompose\Service\Exception;
4
5
use TheAentMachine\AentDockerCompose\Service\Enum\VolumeTypeEnum;
6
7
class VolumeTypeException extends ServiceException
8
{
9
    /** @var string */
10
    private $invalidVolumeType;
11
12
    /**
13
     * VolumeTypeException constructor.
14
     * @param string $invalidVolumeType
15
     */
16
    public function __construct(string $invalidVolumeType)
17
    {
18
        $this->invalidVolumeType = $invalidVolumeType;
19
        parent::__construct($this->invalidVolumeType . " is not a valid volume type. Are accepted : " . VolumeTypeEnum::getVolumeTypes());
0 ignored issues
show
Bug introduced by
Are you sure TheAentMachine\AentDocke...eEnum::getVolumeTypes() of type array can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
        parent::__construct($this->invalidVolumeType . " is not a valid volume type. Are accepted : " . /** @scrutinizer ignore-type */ VolumeTypeEnum::getVolumeTypes());
Loading history...
20
    }
21
}
22