Completed
Push — master ( 52ead2...fd316a )
by David
12s queued 10s
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 : " . json_encode(VolumeTypeEnum::getVolumeTypes()));
20
    }
21
}
22