@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * likely buffer the output so that this may be called after writeRows() |
| 87 | 87 | * |
| 88 | 88 | * @param \Iterator|array A list of header values |
| 89 | - * @return boolean |
|
| 89 | + * @return boolean|null |
|
| 90 | 90 | * @throws CSVelte\Exception\WriteBufferException |
| 91 | 91 | */ |
| 92 | 92 | public function setHeaderRow($headers) |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * This means taking an array of data, and converting it to a Row object |
| 153 | 153 | * |
| 154 | 154 | * @param \Iterator|array of data items |
| 155 | - * @return CSVelte\Table\AbstractRow |
|
| 155 | + * @return Row |
|
| 156 | 156 | * @access protected |
| 157 | 157 | */ |
| 158 | 158 | protected function prepareRow(\Iterator $row) |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * Prepare a cell of data to be written (convert to Data object) |
| 170 | 170 | * |
| 171 | 171 | * @param mixed Any value that can be converted to a CSVelte\Table\Data object |
| 172 | - * @return CSVelte\Table\Data |
|
| 172 | + * @return string |
|
| 173 | 173 | * @access protected |
| 174 | 174 | */ |
| 175 | 175 | protected function prepareData($data) |
@@ -48,6 +48,7 @@ discard block |
||
| 48 | 48 | * Read in the specified amount of characters from the file |
| 49 | 49 | * |
| 50 | 50 | * @param integer Amount of characters to read from file |
| 51 | + * @param integer $length |
|
| 51 | 52 | * @return string The specified amount of characters read from file |
| 52 | 53 | * @access public |
| 53 | 54 | */ |
@@ -72,6 +73,7 @@ discard block |
||
| 72 | 73 | * Write data to the output |
| 73 | 74 | * |
| 74 | 75 | * @param string The data to write |
| 76 | + * @param string $data |
|
| 75 | 77 | * @return int The number of bytes written |
| 76 | 78 | * @access public |
| 77 | 79 | */ |
@@ -97,7 +99,7 @@ discard block |
||
| 97 | 99 | * |
| 98 | 100 | * @param integer Offset to seek to |
| 99 | 101 | * @param integer Position from whence the offset should be applied |
| 100 | - * @return boolean True if seek was successful |
|
| 102 | + * @return integer True if seek was successful |
|
| 101 | 103 | * @access public |
| 102 | 104 | */ |
| 103 | 105 | public function seek($pos, $whence = SEEK_SET) |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | use CSVelte\Contract\Readable; |
| 20 | 20 | use CSVelte\Contract\Writable; |
| 21 | 21 | use CSVelte\Contract\Seekable; |
| 22 | - |
|
| 23 | 22 | use CSVelte\Exception\NotYetImplementedException; |
| 24 | 23 | |
| 25 | 24 | /** |
@@ -139,8 +139,7 @@ discard block |
||
| 139 | 139 | * |
| 140 | 140 | * @param string|resource $stream Either a valid stream URI or an open |
| 141 | 141 | * stream resource (using fopen, fsockopen, et al.) |
| 142 | - * @param array $options An array of any/none of the following options |
|
| 143 | - * (see $options var above for more details) |
|
| 142 | + * @param string $mode |
|
| 144 | 143 | */ |
| 145 | 144 | public function __construct($stream, $mode = null, $context = null) |
| 146 | 145 | { |
@@ -194,6 +193,9 @@ discard block |
||
| 194 | 193 | return false; |
| 195 | 194 | } |
| 196 | 195 | |
| 196 | + /** |
|
| 197 | + * @param resource $stream |
|
| 198 | + */ |
|
| 197 | 199 | protected function setMetaData($stream) |
| 198 | 200 | { |
| 199 | 201 | $this->meta = stream_get_meta_data($stream); |
@@ -360,6 +362,7 @@ discard block |
||
| 360 | 362 | * Writes a string to the stream (if it is writable) |
| 361 | 363 | * |
| 362 | 364 | * @param string The data to be written to the stream |
| 365 | + * @param string $str |
|
| 363 | 366 | * @return int The number of bytes written to the stream |
| 364 | 367 | * @throws CSVelte\Exception\IOException |
| 365 | 368 | */ |
@@ -14,14 +14,12 @@ |
||
| 14 | 14 | namespace CSVelte\IO; |
| 15 | 15 | |
| 16 | 16 | use CSVelte\Traits\ReadLine; |
| 17 | - |
|
| 18 | 17 | use CSVelte\Contract\Readable; |
| 19 | 18 | use CSVelte\Contract\Writable; |
| 20 | 19 | use CSVelte\Contract\Seekable; |
| 21 | 20 | |
| 22 | 21 | use \InvalidArgumentException; |
| 23 | 22 | use CSVelte\Exception\NotYetImplementedException; |
| 24 | -use CSVelte\Exception\EndOfFileException; |
|
| 25 | 23 | use CSVelte\Exception\IOException; |
| 26 | 24 | |
| 27 | 25 | /** |
@@ -300,6 +300,7 @@ discard block |
||
| 300 | 300 | * Remove quotes wrapping text. |
| 301 | 301 | * |
| 302 | 302 | * @param string The data to unquote |
| 303 | + * @param string|null $data |
|
| 303 | 304 | * @return string The data with quotes stripped from the outside of it |
| 304 | 305 | * @internal |
| 305 | 306 | */ |
@@ -326,6 +327,7 @@ discard block |
||
| 326 | 327 | * Parse a line of CSV data into an array of columns |
| 327 | 328 | * |
| 328 | 329 | * @param string A line of CSV data to parse |
| 330 | + * @param string $line |
|
| 329 | 331 | * @return array An array of columns |
| 330 | 332 | * @access protected |
| 331 | 333 | * @internal |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | /** |
| 128 | 128 | * I'm not sure what this is for... |
| 129 | 129 | * @param Readable $input The input source |
| 130 | - * @return CSVelte\Taster |
|
| 130 | + * @return Taster |
|
| 131 | 131 | * @todo Get rid of this unless there is a good reason for having it...? |
| 132 | 132 | * @ignore |
| 133 | 133 | */ |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * such as the delimiting character, quote character, or what types of data are quoted. |
| 144 | 144 | * are quoted. |
| 145 | 145 | * |
| 146 | - * @return CSVelte\Flavor The metadata that the CSV format doesn't provide |
|
| 146 | + * @return Flavor The metadata that the CSV format doesn't provide |
|
| 147 | 147 | * @access public |
| 148 | 148 | * @todo Implement a lickQuote method for when lickQuoteAndDelim method fails |
| 149 | 149 | * @todo Should there bea lickEscapeChar method? the python module that inspired |
@@ -177,6 +177,7 @@ discard block |
||
| 177 | 177 | * replaceQuotedSpecialChars method which (at least to me) makes more sense. |
| 178 | 178 | * |
| 179 | 179 | * @param string The string to replace quoted strings within |
| 180 | + * @param string $data |
|
| 180 | 181 | * @return string The input string with quoted strings removed |
| 181 | 182 | * @access protected |
| 182 | 183 | * @todo Replace code that uses this method with the replaceQuotedSpecialChars |
@@ -191,7 +192,7 @@ discard block |
||
| 191 | 192 | * Examine the input source to determine which character(s) are being used |
| 192 | 193 | * as the end-of-line character |
| 193 | 194 | * |
| 194 | - * @return char The end-of-line char for the input data |
|
| 195 | + * @return string The end-of-line char for the input data |
|
| 195 | 196 | * @access protected |
| 196 | 197 | * @credit pulled from stackoverflow thread *tips hat to username "Harm"* |
| 197 | 198 | * @todo This should throw an exception if it cannot determine the line ending |
@@ -336,6 +337,7 @@ discard block |
||
| 336 | 337 | * @param char The type of quote character being used (single or double) |
| 337 | 338 | * @param char The character used as the column delimiter |
| 338 | 339 | * @param char The character used for newlines |
| 340 | + * @param string $eol |
|
| 339 | 341 | * @return string One of four "QUOTING_" constants defined above--see this |
| 340 | 342 | * method's description for more info. |
| 341 | 343 | * @access protected |
@@ -422,7 +424,7 @@ discard block |
||
| 422 | 424 | * Determine whether a particular string of data has quotes around it. |
| 423 | 425 | * |
| 424 | 426 | * @param string The data to check |
| 425 | - * @return boolean Whether the data is quoted or not |
|
| 427 | + * @return integer Whether the data is quoted or not |
|
| 426 | 428 | * @access protected |
| 427 | 429 | */ |
| 428 | 430 | protected function isQuoted($data) |
@@ -472,6 +474,7 @@ discard block |
||
| 472 | 474 | * |
| 473 | 475 | * @param string The string to do the replacements on |
| 474 | 476 | * @param char The delimiter character to replace |
| 477 | + * @param string $data |
|
| 475 | 478 | * @return string The data with replacements performed |
| 476 | 479 | * @access protected |
| 477 | 480 | * @todo I could probably pass in (maybe optionally) the newline character I |
@@ -498,6 +501,7 @@ discard block |
||
| 498 | 501 | * to be practical. |
| 499 | 502 | * |
| 500 | 503 | * @param string The string of data to check the type of |
| 504 | + * @param string $data |
|
| 501 | 505 | * @return string One of the TYPE_ string constants above |
| 502 | 506 | * @access protected |
| 503 | 507 | * @uses Carbon/Carbon date/time ilbrary/class |