Completed
Push — master ( d21e4b...25fd19 )
by Nikolas
03:46
created

MissingParametersResult::getException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace rtens\domin\execution;
3
4
class MissingParametersResult implements ExecutionResult {
5
6
    private $parameters;
7
8
    /**
9
     * @param \Exception[] $parameters
10
     */
11
    public function __construct(array $parameters) {
12
        $this->parameters = $parameters;
13
    }
14
15
    /**
16
     * @return string[]
17
     */
18
    public function getMissingNames() {
19
        return array_keys($this->parameters);
20
    }
21
22
    /**
23
     * @param string $parameterName
24
     * @return \Exception
25
     */
26
    public function getException($parameterName) {
27
        return $this->parameters[$parameterName];
28
    }
29
}