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

MissingParametersResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 0
dl 0
loc 26
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMissingNames() 0 3 1
A getException() 0 3 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
}