@@ -204,7 +204,7 @@ |
||
| 204 | 204 | * instead, specifying which attributes are to be changed. |
| 205 | 205 | * |
| 206 | 206 | * @param array An array of attribute name/values to change in the copied flavor |
| 207 | - * @return CSVelte\Flavor A flavor object with your new attributes |
|
| 207 | + * @return Flavor A flavor object with your new attributes |
|
| 208 | 208 | * @access public |
| 209 | 209 | * @todo I may want to remove the array type-hint so that this can accept |
| 210 | 210 | * array-like objects and iterables as well. Not sure... |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | namespace CSVelte; |
| 15 | 15 | |
| 16 | 16 | use CSVelte\Exception\UnknownAttributeException; |
| 17 | -use CSVelte\Exception\UnknownFlavorException; |
|
| 18 | 17 | use CSVelte\Exception\ImmutableException; |
| 19 | 18 | |
| 20 | 19 | /** |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | namespace CSVelte\Input; |
| 14 | 14 | |
| 15 | -use CSVelte\Contract\Readable; |
|
| 16 | 15 | use CSVelte\Contract\Seekable; |
| 17 | 16 | |
| 18 | 17 | /** |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | use CSVelte\Exception\EndOfFileException; |
| 18 | 18 | use CSVelte\Traits\HandlesQuotedLineTerminators; |
| 19 | 19 | use CSVelte\Exception\InvalidStreamResourceException; |
| 20 | -use CSVelte\Exception\InvalidStreamUriException; |
|
| 21 | 20 | |
| 22 | 21 | /** |
| 23 | 22 | * CSVelte\Input\Stream |
@@ -212,6 +212,7 @@ |
||
| 212 | 212 | * Remove quotes wrapping text. |
| 213 | 213 | * |
| 214 | 214 | * @param string The data to unquote |
| 215 | + * @param string|null $data |
|
| 215 | 216 | * @return string The data with quotes stripped from the outside of it |
| 216 | 217 | * @internal |
| 217 | 218 | */ |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | /** |
| 174 | 174 | * Return the internal pointer to the first column and return that object |
| 175 | 175 | * |
| 176 | - * @return void |
|
| 176 | + * @return CSVelte\Table\Data|null |
|
| 177 | 177 | * @access public |
| 178 | 178 | */ |
| 179 | 179 | public function rewind() |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | /** |
| 127 | 127 | * I'm not sure what this is for... |
| 128 | 128 | * @param Readable $input The input source |
| 129 | - * @return CSVelte\Taster |
|
| 129 | + * @return Taster |
|
| 130 | 130 | * @todo Get rid of this unless there is a good reason for having it...? |
| 131 | 131 | * @ignore |
| 132 | 132 | */ |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * such as the delimiting character, quote character, or what types of data are quoted. |
| 143 | 143 | * are quoted. |
| 144 | 144 | * |
| 145 | - * @return CSVelte\Flavor The metadata that the CSV format doesn't provide |
|
| 145 | + * @return Flavor The metadata that the CSV format doesn't provide |
|
| 146 | 146 | * @access public |
| 147 | 147 | * @todo Implement a lickQuote method for when lickQuoteAndDelim method fails |
| 148 | 148 | * @todo Should there bea lickEscapeChar method? the python module that inspired |
@@ -175,6 +175,7 @@ discard block |
||
| 175 | 175 | * replaceQuotedSpecialChars method which (at least to me) makes more sense. |
| 176 | 176 | * |
| 177 | 177 | * @param string The string to replace quoted strings within |
| 178 | + * @param string $data |
|
| 178 | 179 | * @return string The input string with quoted strings removed |
| 179 | 180 | * @access protected |
| 180 | 181 | * @todo Replace code that uses this method with the replaceQuotedSpecialChars |
@@ -189,7 +190,7 @@ discard block |
||
| 189 | 190 | * Examine the input source to determine which character(s) are being used |
| 190 | 191 | * as the end-of-line character |
| 191 | 192 | * |
| 192 | - * @return char The end-of-line char for the input data |
|
| 193 | + * @return string The end-of-line char for the input data |
|
| 193 | 194 | * @access protected |
| 194 | 195 | * @credit pulled from stackoverflow thread *tips hat to username "Harm"* |
| 195 | 196 | * @todo This should throw an exception if it cannot determine the line ending |
@@ -333,6 +334,8 @@ discard block |
||
| 333 | 334 | * @param char The type of quote character being used (single or double) |
| 334 | 335 | * @param char The character used as the column delimiter |
| 335 | 336 | * @param char The character used for newlines |
| 337 | + * @param string $data |
|
| 338 | + * @param string $eol |
|
| 336 | 339 | * @return string One of four "QUOTING_" constants defined above--see this |
| 337 | 340 | * method's description for more info. |
| 338 | 341 | * @access protected |
@@ -419,7 +422,7 @@ discard block |
||
| 419 | 422 | * Determine whether a particular string of data has quotes around it. |
| 420 | 423 | * |
| 421 | 424 | * @param string The data to check |
| 422 | - * @return boolean Whether the data is quoted or not |
|
| 425 | + * @return integer Whether the data is quoted or not |
|
| 423 | 426 | * @access protected |
| 424 | 427 | */ |
| 425 | 428 | protected function isQuoted($data) |
@@ -495,6 +498,7 @@ discard block |
||
| 495 | 498 | * to be practical. |
| 496 | 499 | * |
| 497 | 500 | * @param string The string of data to check the type of |
| 501 | + * @param string $data |
|
| 498 | 502 | * @return string One of the TYPE_ string constants above |
| 499 | 503 | * @access protected |
| 500 | 504 | * @uses Carbon/Carbon date/time ilbrary/class |
@@ -554,6 +558,8 @@ discard block |
||
| 554 | 558 | * @param char The CSV data's delimiting char (can be a variety of chars but) |
| 555 | 559 | * typically is either a comma or a tab, sometimes a pipe) |
| 556 | 560 | * @param char The CSV data's end-of-line char(s) (\n \r or \r\n) |
| 561 | + * @param string $data |
|
| 562 | + * @param string $eol |
|
| 557 | 563 | * @return boolean True if the data (most likely) contains a header row |
| 558 | 564 | * @access public |
| 559 | 565 | * @todo This method needs a total refactor. It's not necessary to loop twice |
@@ -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) |