| @@ 683-713 (lines=31) @@ | ||
| 680 | * |
|
| 681 | * @return bool|array |
|
| 682 | */ |
|
| 683 | private function getNavigationError($pos, $isFirst, $isLast) { |
|
| 684 | ||
| 685 | if ($pos === 0) { |
|
| 686 | if ($this->navigateLastError === true) { |
|
| 687 | return end($this->errors); |
|
| 688 | } else { |
|
| 689 | return current($this->errors); |
|
| 690 | } |
|
| 691 | } |
|
| 692 | ||
| 693 | $this->navigateLastError = false; |
|
| 694 | if ($pos === -99) { |
|
| 695 | return reset($this->errors); |
|
| 696 | } |
|
| 697 | ||
| 698 | if ($pos === -1 && !$isFirst) { |
|
| 699 | return prev($this->errors); |
|
| 700 | } |
|
| 701 | ||
| 702 | if ($pos === 1 && !$isLast) { |
|
| 703 | return next($this->errors); |
|
| 704 | } |
|
| 705 | ||
| 706 | if ($pos === 99) { |
|
| 707 | $this->navigateLastError = true; |
|
| 708 | ||
| 709 | return end($this->errors); |
|
| 710 | } |
|
| 711 | ||
| 712 | return false; |
|
| 713 | } |
|
| 714 | ||
| 715 | ||
| 716 | /** |
|
| @@ 644-674 (lines=31) @@ | ||
| 641 | * |
|
| 642 | * @return bool|array |
|
| 643 | */ |
|
| 644 | private function getNavigationError($pos, $isFirst, $isLast) { |
|
| 645 | ||
| 646 | if ($pos === 0) { |
|
| 647 | if ($this->navigateLastError === true) { |
|
| 648 | return end($this->errors); |
|
| 649 | } else { |
|
| 650 | return current($this->errors); |
|
| 651 | } |
|
| 652 | } |
|
| 653 | ||
| 654 | $this->navigateLastError = false; |
|
| 655 | if ($pos === -99) { |
|
| 656 | return reset($this->errors); |
|
| 657 | } |
|
| 658 | ||
| 659 | if ($pos === -1 && !$isFirst) { |
|
| 660 | return prev($this->errors); |
|
| 661 | } |
|
| 662 | ||
| 663 | if ($pos === 1 && !$isLast) { |
|
| 664 | return next($this->errors); |
|
| 665 | } |
|
| 666 | ||
| 667 | if ($pos === 99) { |
|
| 668 | $this->navigateLastError = true; |
|
| 669 | ||
| 670 | return end($this->errors); |
|
| 671 | } |
|
| 672 | ||
| 673 | return false; |
|
| 674 | } |
|
| 675 | ||
| 676 | ||
| 677 | /** |
|