Completed
Push — master ( 52ead2...fd316a )
by David
12s queued 10s
created

KeysMissingInArrayException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace TheAentMachine\AentDockerCompose\Service\Exception;
4
5
class KeysMissingInArrayException extends ServiceException
6
{
7
    /** @var array */
8
    private $array;
9
    /** @var array */
10
    private $missingKeys;
11
12
    /**
13
     * KeysMissingInArrayException constructor.
14
     * @param array $array
15
     * @param array $missingKeys
16
     */
17
    public function __construct(array $array, array $missingKeys)
18
    {
19
        $this->array = $array;
20
        $this->missingKeys = $missingKeys;
21
        parent::__construct(json_encode($this->array) . " should have these keys : " . json_encode($this->missingKeys));
22
    }
23
}
24