| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 27 | public function __construct($converter) |
||
| 28 | { |
||
| 29 | if ($converter instanceof \Closure) { |
||
| 30 | $converter = new ClosureValueConverter($converter); |
||
| 31 | } |
||
| 32 | if (!$converter instanceof ValueConverterInterface) { |
||
| 33 | throw new \InvalidArgumentException('Converter must be instance of Papper\ValueConverterInterface of callable'); |
||
| 34 | } |
||
| 35 | $this->converter = $converter; |
||
| 36 | } |
||
| 37 | |||
| 43 |