Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1.0007 |
Changes | 0 |
1 | <?php |
||
18 | 7 | public function __construct($strategy, array $candidates) |
|
19 | { |
||
20 | 7 | $classes = array_map( |
|
21 | function ($a) { |
||
22 | return $a['class']; |
||
23 | 7 | }, |
|
24 | 7 | $candidates |
|
25 | ); |
||
26 | |||
27 | 7 | $message = sprintf( |
|
28 | 7 | 'No valid candidate found using strategy "%s". We tested the following candidates: %s.', |
|
29 | 7 | $strategy, |
|
30 | 7 | implode(', ', array_map([$this, 'stringify'], $classes)) |
|
31 | ); |
||
32 | |||
33 | 7 | parent::__construct($message); |
|
34 | 7 | } |
|
35 | |||
49 |