@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * also optionally throw an OutOfBoundsException if no value is found. |
| 281 | 281 | * |
| 282 | 282 | * @param mixed $index The index of the data you want to get |
| 283 | - * @param mixed $default The default value to return if none available |
|
| 283 | + * @param null|integer $default The default value to return if none available |
|
| 284 | 284 | * @param bool $throw True if you want an exception to be thrown if no data found at $index |
| 285 | 285 | * @throws OutOfBoundsException If $throw is true and $index isn't found |
| 286 | 286 | * @return mixed The data found at $index or failing that, the $default |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | * Returns a new collection with $items added. |
| 546 | 546 | * |
| 547 | 547 | * @param array $items Any number of arguments will be pushed onto the |
| 548 | - * @return mixed The first item in this collection |
|
| 548 | + * @return AbstractCollection The first item in this collection |
|
| 549 | 549 | */ |
| 550 | 550 | public function push(...$items) |
| 551 | 551 | { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | * |
| 559 | 559 | * Returns a new collection with $items added. |
| 560 | 560 | * |
| 561 | - * @return mixed The first item in this collection |
|
| 561 | + * @return AbstractCollection The first item in this collection |
|
| 562 | 562 | */ |
| 563 | 563 | public function unshift(...$items) |
| 564 | 564 | { |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | /** |
| 698 | 698 | * Returns collection in reverse order. |
| 699 | 699 | * |
| 700 | - * @param null $preserveKeys True if you want to preserve collection's keys |
|
| 700 | + * @param boolean $preserveKeys True if you want to preserve collection's keys |
|
| 701 | 701 | * @return AbstractCollection This collection in reverse order. |
| 702 | 702 | */ |
| 703 | 703 | public function reverse($preserveKeys = null) |
@@ -514,12 +514,12 @@ discard block |
||
| 514 | 514 | return $this->guessDelimByDistribution($decision, $eol); |
| 515 | 515 | } catch (TasterException $e) { |
| 516 | 516 | // if somehow we STILL can't come to a consensus, then fall back to a |
| 517 | - // "preferred delimiters" list... |
|
| 518 | - foreach ($this->delims as $key => $val) { |
|
| 519 | - if ($delim = array_search($val, $decision)) { |
|
| 520 | - return $delim; |
|
| 521 | - } |
|
| 522 | - } |
|
| 517 | + // "preferred delimiters" list... |
|
| 518 | + foreach ($this->delims as $key => $val) { |
|
| 519 | + if ($delim = array_search($val, $decision)) { |
|
| 520 | + return $delim; |
|
| 521 | + } |
|
| 522 | + } |
|
| 523 | 523 | } |
| 524 | 524 | } |
| 525 | 525 | |
@@ -589,8 +589,8 @@ discard block |
||
| 589 | 589 | })->map(function ($dists) { |
| 590 | 590 | return $dists->average(); |
| 591 | 591 | })->sort() |
| 592 | - ->reverse() |
|
| 593 | - ->getKeyAtPosition(0)]; |
|
| 592 | + ->reverse() |
|
| 593 | + ->getKeyAtPosition(0)]; |
|
| 594 | 594 | } catch (Exception $e) { |
| 595 | 595 | throw new TasterException('delimiter cannot be determined by distribution', TasterException::ERR_DELIMITER); |
| 596 | 596 | } |