Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function __construct(PropertyDefinition $source, PropertyDefinition $destination, callable $transform = NULL, callable $reverse = NULL) { |
||
27 | $this->source = $source; |
||
28 | $this->destination = $destination; |
||
29 | if (is_null($transform) !== is_null($reverse)) { |
||
30 | throw new \InvalidArgumentException('Each transform function should have a reverse function and vice versa.'); |
||
31 | } |
||
32 | $this->transform = $transform; |
||
33 | $this->reverse = $reverse; |
||
34 | } |
||
35 | |||
63 |