| @@ 107-116 (lines=10) @@ | ||
| 104 | return new ObjectCallbackIterator($callback, $this->toArray()); |
|
| 105 | } |
|
| 106 | ||
| 107 | public function first() |
|
| 108 | { |
|
| 109 | $first = parent::first(); |
|
| 110 | if ($first === null) { |
|
| 111 | $first = reset($this->rawObjects); |
|
| 112 | return $this->convertFromValue($first); |
|
| 113 | } |
|
| 114 | ||
| 115 | return $first; |
|
| 116 | } |
|
| 117 | ||
| 118 | public function last() |
|
| 119 | { |
|
| @@ 118-128 (lines=11) @@ | ||
| 115 | return $first; |
|
| 116 | } |
|
| 117 | ||
| 118 | public function last() |
|
| 119 | { |
|
| 120 | $last = parent::last(); |
|
| 121 | ||
| 122 | if ($last === null) { |
|
| 123 | $last = end($this->rawObjects); |
|
| 124 | return $this->convertFromValue($last); |
|
| 125 | } |
|
| 126 | ||
| 127 | return $last; |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * {@inheritdoc} |
|