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