Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function __construct(array $params = array()) |
||
23 | { |
||
24 | $missing = array(); |
||
25 | foreach ($this->getRequiredParams() as $key) { |
||
26 | if (array_key_exists($key, $params) === false) { |
||
27 | array_push($missing, $key); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | if (empty($missing) === false) { |
||
32 | throw new KeyClientException('Missing parameters passed: ' . implode(', ', $missing)); |
||
33 | } |
||
34 | |||
35 | $this->params = $params; |
||
36 | } |
||
37 | |||
82 | } |