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

KeysMissingInArrayException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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