@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * {@inheritDoc} |
| 72 | - * @return $this |
|
| 72 | + * @return Dictionary |
|
| 73 | 73 | */ |
| 74 | 74 | public function groupBy($callback) |
| 75 | 75 | { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * {@inheritDoc} |
| 93 | - * @return $this |
|
| 93 | + * @return Dictionary |
|
| 94 | 94 | */ |
| 95 | 95 | public function indexBy($callback) |
| 96 | 96 | { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @param $key - The key to set a value. |
| 23 | 23 | * @param $value - The value to add. |
| 24 | 24 | * |
| 25 | - * @return - A shallow copy of the updated current collection itself. |
|
| 25 | + * @return Dictionary A shallow copy of the updated current collection itself. |
|
| 26 | 26 | */ |
| 27 | 27 | public function add($key, $value); |
| 28 | 28 | } |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | */ |
| 111 | 111 | public function removeAll(Iterable $iterable) |
| 112 | 112 | { |
| 113 | - $iterable->each(function ($item) { |
|
| 113 | + $iterable->each(function($item) { |
|
| 114 | 114 | if ($this->contains($item)) { |
| 115 | 115 | $this->remove($item); |
| 116 | 116 | } |
@@ -229,8 +229,8 @@ discard block |
||
| 229 | 229 | { |
| 230 | 230 | /** @var VectorInterface $results */ |
| 231 | 231 | $results = new static(); |
| 232 | - $this->each(function (Iterable $subArray) use ($results) { |
|
| 233 | - $subArray->each(function ($item) use ($results) { |
|
| 232 | + $this->each(function(Iterable $subArray) use ($results) { |
|
| 233 | + $subArray->each(function($item) use ($results) { |
|
| 234 | 234 | $results->add($item); |
| 235 | 235 | }); |
| 236 | 236 | }); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $merged = $array; |
| 256 | 256 | |
| 257 | 257 | foreach ($array1 as $key => $value) { |
| 258 | - $isValid = function ($value) { |
|
| 258 | + $isValid = function($value) { |
|
| 259 | 259 | return (is_array($value) || $value instanceof \Traversable); |
| 260 | 260 | }; |
| 261 | 261 | |
@@ -226,8 +226,8 @@ discard block |
||
| 226 | 226 | { |
| 227 | 227 | /** @var MapInterface $results */ |
| 228 | 228 | $results = new static(); |
| 229 | - $this->each(function (Iterable $subArray) use ($results) { |
|
| 230 | - $subArray->each(function ($item, $key) use ($results) { |
|
| 229 | + $this->each(function(Iterable $subArray) use ($results) { |
|
| 230 | + $subArray->each(function($item, $key) use ($results) { |
|
| 231 | 231 | $results->add($key, $item); |
| 232 | 232 | }); |
| 233 | 233 | }); |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $merged = $array; |
| 241 | 241 | |
| 242 | 242 | foreach ($array1 as $key => $value) { |
| 243 | - $isValid = function ($value) { |
|
| 243 | + $isValid = function($value) { |
|
| 244 | 244 | return (is_array($value) || $value instanceof \Traversable); |
| 245 | 245 | }; |
| 246 | 246 | |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | { |
| 95 | 95 | $key = array_search($element, $this->container); |
| 96 | 96 | |
| 97 | - if(false === $key) { |
|
| 97 | + if (false === $key) { |
|
| 98 | 98 | throw new \OutOfBoundsException('No element found in the collection '); |
| 99 | 99 | } |
| 100 | 100 | |