| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class ArrayKeyTransformer extends TransformerAbstract |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Any callable with one argument which returns something |
||
| 19 | * |
||
| 20 | * @var callable |
||
| 21 | */ |
||
| 22 | protected $mapper; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param callable $mapper |
||
| 26 | * |
||
| 27 | * @throws NodalFlowException |
||
| 28 | */ |
||
| 29 | public function __construct(callable $mapper) |
||
| 30 | { |
||
| 31 | $this->mapper = $mapper; |
||
| 32 | parent::__construct(); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Execute the array_map call |
||
| 37 | * |
||
| 38 | * @param array $param |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function exec($param = null) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |