| @@ 60-67 (lines=8) @@ | ||
| 57 | $this->storage->push($element); |
|
| 58 | } |
|
| 59 | ||
| 60 | public function offerFirst($element) |
|
| 61 | { |
|
| 62 | if ('' !== $this->checkAddOffer($element)) { |
|
| 63 | return false; |
|
| 64 | } |
|
| 65 | $this->storage->unshift($element); |
|
| 66 | return true; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function offerLast($element) |
|
| 70 | { |
|
| @@ 69-76 (lines=8) @@ | ||
| 66 | return true; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function offerLast($element) |
|
| 70 | { |
|
| 71 | if ('' !== $this->checkAddOffer($element)) { |
|
| 72 | return false; |
|
| 73 | } |
|
| 74 | $this->storage->push($element); |
|
| 75 | return true; |
|
| 76 | } |
|
| 77 | ||
| 78 | public function getFirst() |
|
| 79 | { |
|