@@ -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 | /** |
@@ -329,7 +329,7 @@ |
||
329 | 329 | * @param string $str The string to unescape |
330 | 330 | * @param string $esc The escape character used |
331 | 331 | * @param string $quo The quote character used |
332 | - * @return mixed The string with characters unescaped |
|
332 | + * @return string The string with characters unescaped |
|
333 | 333 | * @todo This actually shouldn't even be necessary. Characters should be read |
334 | 334 | * in one at a time and a quote that follows another should just be ignored |
335 | 335 | * deeming this unnecessary. |
@@ -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 | * |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | * Returns a new collection with $items added. |
441 | 441 | * |
442 | 442 | * @param array $items Any number of arguments will be pushed onto the |
443 | - * @return mixed The first item in this collection |
|
443 | + * @return Collection The first item in this collection |
|
444 | 444 | */ |
445 | 445 | public function push(...$items) |
446 | 446 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | * |
454 | 454 | * Returns a new collection with $items added. |
455 | 455 | * |
456 | - * @return mixed The first item in this collection |
|
456 | + * @return Collection The first item in this collection |
|
457 | 457 | */ |
458 | 458 | public function unshift(...$items) |
459 | 459 | { |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | /** |
593 | 593 | * Returns collection in reverse order. |
594 | 594 | * |
595 | - * @param null $preserveKeys True if you want to preserve collection's keys |
|
595 | + * @param boolean $preserveKeys True if you want to preserve collection's keys |
|
596 | 596 | * @return Collection This collection in reverse order. |
597 | 597 | */ |
598 | 598 | public function reverse($preserveKeys = null) |
@@ -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 | { |
@@ -484,22 +484,22 @@ discard block |
||
484 | 484 | // at least the same general area. Use the delimiter that is the most |
485 | 485 | // consistent in that way... |
486 | 486 | |
487 | - /** |
|
488 | - * @todo Add a method here to figure out where duplicate best-match |
|
489 | - * delimiter(s) fall within each line and then, depending on |
|
490 | - * which one has the best distribution, return that one. |
|
491 | - */ |
|
492 | - $decision = $dups->get($max); |
|
487 | + /** |
|
488 | + * @todo Add a method here to figure out where duplicate best-match |
|
489 | + * delimiter(s) fall within each line and then, depending on |
|
490 | + * which one has the best distribution, return that one. |
|
491 | + */ |
|
492 | + $decision = $dups->get($max); |
|
493 | 493 | try { |
494 | 494 | return $this->guessDelimByDistribution($decision, $eol); |
495 | 495 | } catch (TasterException $e) { |
496 | 496 | // if somehow we STILL can't come to a consensus, then fall back to a |
497 | - // "preferred delimiters" list... |
|
498 | - foreach ($this->delims as $key => $val) { |
|
499 | - if ($delim = array_search($val, $decision)) { |
|
500 | - return $delim; |
|
501 | - } |
|
502 | - } |
|
497 | + // "preferred delimiters" list... |
|
498 | + foreach ($this->delims as $key => $val) { |
|
499 | + if ($delim = array_search($val, $decision)) { |
|
500 | + return $delim; |
|
501 | + } |
|
502 | + } |
|
503 | 503 | } |
504 | 504 | } |
505 | 505 | |
@@ -568,8 +568,8 @@ discard block |
||
568 | 568 | })->map(function ($dists) { |
569 | 569 | return $dists->average(); |
570 | 570 | })->sort() |
571 | - ->reverse() |
|
572 | - ->getKeyAtPosition(0)]; |
|
571 | + ->reverse() |
|
572 | + ->getKeyAtPosition(0)]; |
|
573 | 573 | } catch (Exception $e) { |
574 | 574 | throw new TasterException('delimiter cannot be determined by distribution', TasterException::ERR_DELIMITER); |
575 | 575 | } |
@@ -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 | } |