| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | public function __map($callback):array { |
||
| 68 | |||
| 69 | if(!is_callable($callback)){ |
||
| 70 | throw new DBException('invalid callback'); |
||
| 71 | } |
||
| 72 | |||
| 73 | $return = []; |
||
| 74 | |||
| 75 | foreach($this->array as $index => $element){ |
||
| 76 | $return[$index] = call_user_func_array($callback, [$element, $index]); |
||
| 77 | } |
||
| 78 | |||
| 79 | return $return; |
||
| 80 | } |
||
| 81 | |||
| 95 |