@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | * |
616 | 616 | * @param int|mixed The offset to set |
617 | 617 | * @param any The value to set it to |
618 | - * @return boolean |
|
618 | + * @return Collection |
|
619 | 619 | */ |
620 | 620 | public function offsetSet($offset, $value) |
621 | 621 | { |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | * |
685 | 685 | * @param boolean $multi Whether to count just the items in the collection or |
686 | 686 | * to count the items in each tabular data row. |
687 | - * @return int|\CSVelte\Collection Either an integer count or a collection of counts |
|
687 | + * @return string Either an integer count or a collection of counts |
|
688 | 688 | */ |
689 | 689 | public function count($multi = false) |
690 | 690 | { |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | * Filter out unwanted items using a callback function. |
772 | 772 | * |
773 | 773 | * @param Callable $callback |
774 | - * @return CSVelte\Collection A new collection with filtered items removed |
|
774 | + * @return Collection A new collection with filtered items removed |
|
775 | 775 | */ |
776 | 776 | public function filter(Callable $callback) |
777 | 777 | { |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | * Returns an array where the key is a value in the collection and the value |
824 | 824 | * is the number of times that value appears in the collection. |
825 | 825 | * |
826 | - * @return CSVelte\Collection A collection of value frequencies (see description) |
|
826 | + * @return Collection A collection of value frequencies (see description) |
|
827 | 827 | */ |
828 | 828 | public function frequency() |
829 | 829 | { |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | * Returns a collection with duplicate values removed. If two-dimensional, |
848 | 848 | * then each array within the collection will have its duplicates removed. |
849 | 849 | * |
850 | - * @return CSVelte\Collection A new collection with duplicate values removed. |
|
850 | + * @return Collection A new collection with duplicate values removed. |
|
851 | 851 | */ |
852 | 852 | public function unique() |
853 | 853 | { |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | * Returns a collection of arrays where the key is the duplicate value |
864 | 864 | * and the value is an array of keys from the original collection. |
865 | 865 | * |
866 | - * @return CSVelte\Collection A new collection with duplicate values. |
|
866 | + * @return Collection A new collection with duplicate values. |
|
867 | 867 | */ |
868 | 868 | public function duplicates() |
869 | 869 | { |
@@ -881,7 +881,7 @@ discard block |
||
881 | 881 | * |
882 | 882 | * Get a new collection where the keys and values have been swapped. |
883 | 883 | * |
884 | - * @return CSVelte\Collection A new collection where keys/values have been swapped |
|
884 | + * @return Collection A new collection where keys/values have been swapped |
|
885 | 885 | */ |
886 | 886 | public function flip() |
887 | 887 | { |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | * first is the default. |
896 | 896 | * |
897 | 897 | * @param boolean Whether you want pairs in [k => v] rather than [k, v] format |
898 | - * @return CSVelte\Collection A collection of key/value pairs |
|
898 | + * @return Collection A collection of key/value pairs |
|
899 | 899 | */ |
900 | 900 | public function pairs($alt = false) |
901 | 901 | { |
@@ -1059,7 +1059,7 @@ discard block |
||
1059 | 1059 | * |
1060 | 1060 | * @param Callable $callback The sorting function you want to use |
1061 | 1061 | * @param boolean $preserve_keys Whether you want to preserve keys |
1062 | - * @return CSVelte\Collection A new collection sorted by $callback |
|
1062 | + * @return Collection A new collection sorted by $callback |
|
1063 | 1063 | */ |
1064 | 1064 | public function sort(Callable $callback = null, $preserve_keys = true) |
1065 | 1065 | { |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | * @param string $key The key you want to order by |
1090 | 1090 | * @param Callable $cmp The sorting comparison algorithm to use |
1091 | 1091 | * @param boolean $preserve_keys Whether keys should be preserved |
1092 | - * @return CSVelte\Collection A new collection sorted by $cmp and $key |
|
1092 | + * @return Collection A new collection sorted by $cmp and $key |
|
1093 | 1093 | */ |
1094 | 1094 | public function orderBy($key, Callable $cmp = null, $preserve_keys = true) |
1095 | 1095 | { |
@@ -1113,13 +1113,16 @@ discard block |
||
1113 | 1113 | * trying to write a particular sorting algurithm that sorts forwards and back. |
1114 | 1114 | * |
1115 | 1115 | * @param boolean $preserve_keys Whether keys should be preserved |
1116 | - * @return CSVelte\Collection A new collection in reverse order |
|
1116 | + * @return Collection A new collection in reverse order |
|
1117 | 1117 | */ |
1118 | 1118 | public function reverse($preserve_keys = true) |
1119 | 1119 | { |
1120 | 1120 | return new self(array_reverse($this->data, $preserve_keys)); |
1121 | 1121 | } |
1122 | 1122 | |
1123 | + /** |
|
1124 | + * @param string $method |
|
1125 | + */ |
|
1123 | 1126 | protected function if2DMapInternalMethod($method) |
1124 | 1127 | { |
1125 | 1128 | if ($this->is2D()) { |