1 | <?php |
||
11 | trait FirstTrait |
||
12 | { |
||
13 | /** |
||
14 | * Returns the first element of this iterable or |
||
15 | * returns $DEFAULT when this iterable is empty |
||
16 | * |
||
17 | * @param mixed $default |
||
18 | * @return mixed |
||
19 | */ |
||
20 | 1 | public function first($default = null) |
|
24 | |||
25 | /** |
||
26 | * Returns the key of the first element of this iterable or |
||
27 | * returns $DEFAULT when this iterable is empty |
||
28 | * |
||
29 | * @param mixed $default |
||
30 | * @return mixed |
||
31 | */ |
||
32 | 5 | public function firstKey($default = null) |
|
40 | } |
||
41 |