| @@ -141,7 +141,7 @@ | ||
| 141 | 141 | * | 
| 142 | 142 | * @param integer Offset to seek to | 
| 143 | 143 | * @param integer Position from whence the offset should be applied | 
| 144 | - * @return boolean True if seek was successful | |
| 144 | + * @return integer True if seek was successful | |
| 145 | 145 | * @access public | 
| 146 | 146 | */ | 
| 147 | 147 | public function seek($pos, $whence = SEEK_SET) | 
| @@ -22,8 +22,6 @@ | ||
| 22 | 22 | use CSVelte\Contract\Writable; | 
| 23 | 23 | use CSVelte\Contract\Seekable; | 
| 24 | 24 | |
| 25 | -use CSVelte\Exception\NotYetImplementedException; | |
| 26 | - | |
| 27 | 25 | /** | 
| 28 | 26 | * CSVelte File. | 
| 29 | 27 | * | 
| @@ -145,6 +145,7 @@ discard block | ||
| 145 | 145 | * ``fopen`` function | 
| 146 | 146 | * @param array Stream context options array as passed to native php | 
| 147 | 147 | * ``stream_context_create`` function | 
| 148 | + * @param string $mode | |
| 148 | 149 | * @see http://php.net/manual/en/function.fopen.php | 
| 149 | 150 | * @see http://php.net/manual/en/function.stream-context-create.php | 
| 150 | 151 | */ | 
| @@ -174,7 +175,7 @@ discard block | ||
| 174 | 175 | * ``fopen`` function) | 
| 175 | 176 | * @param array $context Stream context options array as passed to native | 
| 176 | 177 | * php ``stream_context_create`` function | 
| 177 | - * @return stream resource object | |
| 178 | + * @return resource resource object | |
| 178 | 179 | * @throws CSVelte\Exception\IOException on invalid stream uri/resource | 
| 179 | 180 | * @throws \InvalidArgumentException if context param is not an array | 
| 180 | 181 | * @see http://php.net/manual/en/function.fopen.php | 
| @@ -328,7 +329,7 @@ discard block | ||
| 328 | 329 | * Reads $length bytes (number of characters) from the stream | 
| 329 | 330 | * | 
| 330 | 331 | * @param int $length Number of bytes to read from stream | 
| 331 | - * @return string|boolean The data read from stream or false if at end of | |
| 332 | + * @return false|string The data read from stream or false if at end of | |
| 332 | 333 | * file or some other problem. | 
| 333 | 334 | * @throws CSVelte\Exception\IOException | 
| 334 | 335 | */ | 
| @@ -16,14 +16,11 @@ | ||
| 16 | 16 | use CSVelte\Traits\IsReadable; | 
| 17 | 17 | use CSVelte\Traits\IsWritable; | 
| 18 | 18 | use CSVelte\Traits\IsSeekable; | 
| 19 | - | |
| 20 | 19 | use CSVelte\Contract\Readable; | 
| 21 | 20 | use CSVelte\Contract\Writable; | 
| 22 | 21 | use CSVelte\Contract\Seekable; | 
| 23 | 22 | |
| 24 | 23 | use \InvalidArgumentException; | 
| 25 | -use CSVelte\Exception\NotYetImplementedException; | |
| 26 | -use CSVelte\Exception\EndOfFileException; | |
| 27 | 24 | use CSVelte\Exception\IOException; | 
| 28 | 25 | |
| 29 | 26 | /** | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | * | 
| 102 | 102 | * Set the ``CSVelte\Flavor`` object, used to determine CSV format. | 
| 103 | 103 | * | 
| 104 | - * @param \CSVelte\Flavor|array $flavor Either an array or a flavor object | |
| 104 | + * @param Flavor|null $flavor Either an array or a flavor object | |
| 105 | 105 | */ | 
| 106 | 106 | protected function setFlavor($flavor) | 
| 107 | 107 |      { | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | * readable (can be read). This will make sure that whatever is passed to | 
| 127 | 127 | * the reader meets these expectations and set $this->source. | 
| 128 | 128 | * | 
| 129 | - * @param \CSVelte\Contract\Readable|object|string $input See description | |
| 129 | + * @param Readable $input See description | |
| 130 | 130 | * @return $this | 
| 131 | 131 | */ | 
| 132 | 132 | protected function setSource($input) | 
| @@ -325,6 +325,9 @@ discard block | ||
| 325 | 325 | * @todo This actually shouldn't even be necessary. Characters should be read | 
| 326 | 326 | * in one at a time and a quote that follows another should just be ignored | 
| 327 | 327 | * deeming this unnecessary. | 
| 328 | + * @param string $str | |
| 329 | + * @param string $esc | |
| 330 | + * @param string $quo | |
| 328 | 331 | */ | 
| 329 | 332 | protected function unEscape($str, $esc, $quo) | 
| 330 | 333 |      { | 
| @@ -335,6 +338,7 @@ discard block | ||
| 335 | 338 | * Parse a line of CSV data into an array of columns | 
| 336 | 339 | * | 
| 337 | 340 | * @param string A line of CSV data to parse | 
| 341 | + * @param string $line | |
| 338 | 342 | * @return array An array of columns | 
| 339 | 343 | * @access protected | 
| 340 | 344 | * @internal | 
| @@ -165,6 +165,7 @@ discard block | ||
| 165 | 165 | * replaceQuotedSpecialChars method which (at least to me) makes more sense. | 
| 166 | 166 | * | 
| 167 | 167 | * @param string The string to replace quoted strings within | 
| 168 | + * @param string $data | |
| 168 | 169 | * @return string The input string with quoted strings removed | 
| 169 | 170 | * @access protected | 
| 170 | 171 | * @todo Replace code that uses this method with the replaceQuotedSpecialChars | 
| @@ -331,6 +332,7 @@ discard block | ||
| 331 | 332 | * @param string The type of quote character being used (single or double) | 
| 332 | 333 | * @param string The character used as the column delimiter | 
| 333 | 334 | * @param string The character used for newlines | 
| 335 | + * @param string $eol | |
| 334 | 336 | * @return string One of four "QUOTING_" constants defined above--see this | 
| 335 | 337 | * method's description for more info. | 
| 336 | 338 | * @access protected | 
| @@ -417,7 +419,7 @@ discard block | ||
| 417 | 419 | * Determine whether a particular string of data has quotes around it. | 
| 418 | 420 | * | 
| 419 | 421 | * @param string The data to check | 
| 420 | - * @return boolean Whether the data is quoted or not | |
| 422 | + * @return integer Whether the data is quoted or not | |
| 421 | 423 | * @access protected | 
| 422 | 424 | */ | 
| 423 | 425 | protected function isQuoted($data) | 
| @@ -467,6 +469,7 @@ discard block | ||
| 467 | 469 | * | 
| 468 | 470 | * @param string The string to do the replacements on | 
| 469 | 471 | * @param string The delimiter character to replace | 
| 472 | + * @param string $data | |
| 470 | 473 | * @return string The data with replacements performed | 
| 471 | 474 | * @access protected | 
| 472 | 475 | * @todo I could probably pass in (maybe optionally) the newline character I | 
| @@ -493,6 +496,7 @@ discard block | ||
| 493 | 496 | * to be practical. | 
| 494 | 497 | * | 
| 495 | 498 | * @param string The string of data to check the type of | 
| 499 | + * @param string $data | |
| 496 | 500 | * @return string One of the TYPE_ string constants above | 
| 497 | 501 | * @access protected | 
| 498 | 502 | * @uses \Carbon\Carbon date/time ilbrary/class | 
| @@ -552,6 +556,7 @@ discard block | ||
| 552 | 556 | * @param string The CSV data's delimiting char (can be a variety of chars but) | 
| 553 | 557 | * typically is either a comma or a tab, sometimes a pipe) | 
| 554 | 558 | * @param string The CSV data's end-of-line char(s) (\n \r or \r\n) | 
| 559 | + * @param string $eol | |
| 555 | 560 | * @return boolean True if the data (most likely) contains a header row | 
| 556 | 561 | * @access public | 
| 557 | 562 | * @todo This method needs a total refactor. It's not necessary to loop twice | 
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | * likely buffer the output so that this may be called after writeRows() | 
| 91 | 91 | * | 
| 92 | 92 | * @param \Iterator|array A list of header values | 
| 93 | - * @return boolean | |
| 93 | + * @return boolean|null | |
| 94 | 94 | * @throws \CSVelte\Exception\WriterException | 
| 95 | 95 | */ | 
| 96 | 96 | public function setHeaderRow($headers) | 
| @@ -161,7 +161,7 @@ discard block | ||
| 161 | 161 | * This means taking an array of data, and converting it to a Row object | 
| 162 | 162 | * | 
| 163 | 163 | * @param \Iterator|array of data items | 
| 164 | - * @return CSVelte\Table\AbstractRow | |
| 164 | + * @return Row | |
| 165 | 165 | * @access protected | 
| 166 | 166 | */ | 
| 167 | 167 | protected function prepareRow(Iterator $row) | 
| @@ -189,6 +189,9 @@ discard block | ||
| 189 | 189 | return $this->quoteString($data); | 
| 190 | 190 | } | 
| 191 | 191 | |
| 192 | + /** | |
| 193 | + * @param string $str | |
| 194 | + */ | |
| 192 | 195 | protected function quoteString($str) | 
| 193 | 196 |      { | 
| 194 | 197 | $flvr = $this->getFlavor(); |