| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class CallableTransformer extends PayloadNodeAbstract implements TransformerInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * The underlying executable or traversable Payload |
||
| 22 | * |
||
| 23 | * @var callable |
||
| 24 | */ |
||
| 25 | protected $payload; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Instantiate the transformer |
||
| 29 | * |
||
| 30 | * @param callable $payload |
||
| 31 | * |
||
| 32 | * @throws NodalFlowException |
||
| 33 | */ |
||
| 34 | public function __construct(callable $payload) |
||
| 35 | { |
||
| 36 | parent::__construct($payload, true, false); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Execute the callable payload |
||
| 41 | * |
||
| 42 | * @param mixed $param the record |
||
| 43 | * |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | public function exec($param = null) |
||
| 49 | } |
||
| 50 | } |
||
| 51 |