@@ -56,7 +56,7 @@ |
||
56 | 56 | public function __construct($fields) |
57 | 57 | { |
58 | 58 | $this->setFields($fields) |
59 | - ->rewind(); |
|
59 | + ->rewind(); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | protected function setFields($fields) |
@@ -91,8 +91,8 @@ |
||
91 | 91 | public function __construct($input, $flavor = null) |
92 | 92 | { |
93 | 93 | $this->setSource($input) |
94 | - ->setFlavor($flavor) |
|
95 | - ->rewind(); |
|
94 | + ->setFlavor($flavor) |
|
95 | + ->rewind(); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -19,7 +19,6 @@ |
||
19 | 19 | if (if $file->hasHeader()) { |
20 | 20 | $header = $file->getHeader() |
21 | 21 | } |
22 | - |
|
23 | 22 | * you can instead simply call $header->getHeader() and handle this exception if |
24 | 23 | * said file has no header |
25 | 24 | * |
@@ -692,7 +692,7 @@ |
||
692 | 692 | * |
693 | 693 | * @param string $data The data to check |
694 | 694 | * |
695 | - * @return bool Whether the data is quoted or not |
|
695 | + * @return integer Whether the data is quoted or not |
|
696 | 696 | */ |
697 | 697 | protected function isQuoted($data) |
698 | 698 | { |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | return $this->guessDelimByDistribution($decision, $eol); |
514 | 514 | } catch (TasterException $e) { |
515 | 515 | // if somehow we STILL can't come to a consensus, then fall back to a |
516 | - // "preferred delimiters" list... |
|
517 | - foreach ($this->delims as $key => $chr) { |
|
518 | - if (collect($decision)->contains($chr)) { |
|
519 | - return $chr; |
|
520 | - } |
|
521 | - } |
|
516 | + // "preferred delimiters" list... |
|
517 | + foreach ($this->delims as $key => $chr) { |
|
518 | + if (collect($decision)->contains($chr)) { |
|
519 | + return $chr; |
|
520 | + } |
|
521 | + } |
|
522 | 522 | } |
523 | 523 | } |
524 | 524 | |
@@ -588,8 +588,8 @@ discard block |
||
588 | 588 | })->map(function ($dists) { |
589 | 589 | return $dists->average(); |
590 | 590 | })->sort() |
591 | - ->reverse() |
|
592 | - ->getKeyAtPosition(0)]; |
|
591 | + ->reverse() |
|
592 | + ->getKeyAtPosition(0)]; |
|
593 | 593 | } catch (Exception $e) { |
594 | 594 | throw new TasterException('delimiter cannot be determined by distribution', TasterException::ERR_DELIMITER); |
595 | 595 | } |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | |
186 | 186 | // ok we're opening a new stream resource handle |
187 | 187 | $this->setUri($uri) |
188 | - ->setMode($mode) |
|
189 | - ->setLazy($lazy) |
|
190 | - ->setUseIncludePath($use_include_path) |
|
191 | - ->setContext($context_options, $context_params); |
|
188 | + ->setMode($mode) |
|
189 | + ->setLazy($lazy) |
|
190 | + ->setUseIncludePath($use_include_path) |
|
191 | + ->setContext($context_options, $context_params); |
|
192 | 192 | if (!$this->isLazy()) { |
193 | 193 | $this->connect(); |
194 | 194 | } |
@@ -351,9 +351,9 @@ discard block |
||
351 | 351 | |
352 | 352 | $this->flag = ''; |
353 | 353 | $this->setBaseMode($base) |
354 | - ->setIsPlus($plus == '+') |
|
355 | - ->setIsText($flag == 't') |
|
356 | - ->setIsBinary($flag == 'b'); |
|
354 | + ->setIsPlus($plus == '+') |
|
355 | + ->setIsText($flag == 't') |
|
356 | + ->setIsBinary($flag == 'b'); |
|
357 | 357 | |
358 | 358 | return $this; |
359 | 359 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | * also optionally throw an OutOfBoundsException if no value is found. |
283 | 283 | * |
284 | 284 | * @param mixed $index The index of the data you want to get |
285 | - * @param mixed $default The default value to return if none available |
|
285 | + * @param null|integer $default The default value to return if none available |
|
286 | 286 | * @param bool $throw True if you want an exception to be thrown if no data found at $index |
287 | 287 | * @throws OutOfBoundsException If $throw is true and $index isn't found |
288 | 288 | * @return mixed The data found at $index or failing that, the $default |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | * Returns a new collection with $items added. |
548 | 548 | * |
549 | 549 | * @param array $items Any number of arguments will be pushed onto the |
550 | - * @return mixed The first item in this collection |
|
550 | + * @return AbstractCollection The first item in this collection |
|
551 | 551 | */ |
552 | 552 | public function push(...$items) |
553 | 553 | { |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | * |
561 | 561 | * Returns a new collection with $items added. |
562 | 562 | * |
563 | - * @return mixed The first item in this collection |
|
563 | + * @return AbstractCollection The first item in this collection |
|
564 | 564 | */ |
565 | 565 | public function unshift(...$items) |
566 | 566 | { |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | /** |
617 | 617 | * Iterate over each item that matches criteria in callback |
618 | 618 | * |
619 | - * @param Closure|callable $callback A callback to use |
|
619 | + * @param Closure $callback A callback to use |
|
620 | 620 | * @param object $bindTo The object to bind to |
621 | 621 | * @return AbstractCollection |
622 | 622 | */ |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | /** |
725 | 725 | * Returns collection in reverse order. |
726 | 726 | * |
727 | - * @param null $preserveKeys True if you want to preserve collection's keys |
|
727 | + * @param boolean $preserveKeys True if you want to preserve collection's keys |
|
728 | 728 | * @return AbstractCollection This collection in reverse order. |
729 | 729 | */ |
730 | 730 | public function reverse($preserveKeys = null) |