summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorignace nyamagana butera <nyamsprod@gmail.com>2014-11-12 20:54:22 +0100
committerignace nyamagana butera <nyamsprod@gmail.com>2014-11-12 20:54:22 +0100
commit539230130d2bf9f548ac0a49a306a08dc0dfec85 (patch)
treee6c38db6d0a50ee959d2d40200c717a8cb1d173f
parent3c5ef23e6885e0e782c2a57a2ad27003b0e45dd3 (diff)
downloadcsv-6.0.1.zip
csv-6.0.1.tar.gz
csv-6.0.1.tar.bz2
bump version 6.0.16.0.1
-rw-r--r--CHANGELOG.md8
-rw-r--r--src/AbstractCsv.php20
-rw-r--r--src/Config/Controls.php36
-rw-r--r--src/Config/StreamFilter.php22
-rw-r--r--src/Iterator/MapIterator.php2
-rw-r--r--src/Iterator/Query.php12
-rw-r--r--src/Reader.php20
-rw-r--r--src/Writer.php50
8 files changed, 82 insertions, 88 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85e04bd..16346d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,7 @@
#Changelog
All Notable changes to `League\Csv` will be documented in this file
-## NEXT - YYYY-MM-DD
+## 6.0.1 - 2014-11-12
### Added
- Nothing
@@ -10,15 +10,15 @@ All Notable changes to `League\Csv` will be documented in this file
- Nothing
### Fixed
-- Nothing
+- Bug Fixed `detectDelimiterList`
### Remove
- Nothing
### Security
-- Bug Fixed `detectDelimiterList`
+- Nothing
-## 6.0 - 2014-08-28
+## 6.0.0 - 2014-08-28
### Added
- Stream Filter API in `League\Csv\AbstractCsv`
diff --git a/src/AbstractCsv.php b/src/AbstractCsv.php
index 23acbbc..566a28c 100644
--- a/src/AbstractCsv.php
+++ b/src/AbstractCsv.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -67,7 +67,7 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
protected $encodingFrom = 'UTF-8';
/**
- * The constructor
+ * Create a new instance
*
* The path must be an SplFileInfo object
* an object that implements the `__toString` method
@@ -139,9 +139,9 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
* @param object|string $path file path
* @param string $open_mode the file open mode flag
*
- * @return static
- *
* @throws \InvalidArgumentException If $path is a \SplTempFileObject object
+ *
+ * @return static
*/
public static function createFromPath($path, $open_mode = 'r+')
{
@@ -189,9 +189,9 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
*
* @param string|object $str the string
*
- * @return static
- *
* @throws \InvalidArgumentException If the data provided is invalid
+ *
+ * @return static
*/
public static function createFromString($str)
{
@@ -230,7 +230,7 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
*
* @param string $open_mode the file open mode flag
*
- * @return \League\Csv\Writer object
+ * @return \League\Csv\Writer
*/
public function newWriter($open_mode = 'r+')
{
@@ -242,7 +242,7 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
*
* @param string $open_mode the file open mode flag
*
- * @return \League\Csv\Reader object
+ * @return \League\Csv\Reader
*/
public function newReader($open_mode = 'r+')
{
@@ -332,9 +332,9 @@ abstract class AbstractCsv implements JsonSerializable, IteratorAggregate
/**
* Validate a variable to be stringable
*
- * @param mixed $str
+ * @param string $str
*
- * @return boolean
+ * @return bool
*/
public static function isValidString($str)
{
diff --git a/src/Config/Controls.php b/src/Config/Controls.php
index 96ae302..fb2dd7e 100644
--- a/src/Config/Controls.php
+++ b/src/Config/Controls.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -50,7 +50,7 @@ trait Controls
/**
* the \SplFileObject flags holder
*
- * @var integer
+ * @var int
*/
protected $flags = SplFileObject::READ_CSV;
@@ -66,9 +66,9 @@ trait Controls
*
* @param string $delimiter
*
- * @return $this
- *
* @throws \InvalidArgumentException If $delimeter is not a single character
+ *
+ * @return $this
*/
public function setDelimiter($delimiter = ',')
{
@@ -93,10 +93,10 @@ trait Controls
/**
* detect the actual number of row according to a delimiter
*
- * @param string $delimiter a CSV delimiter
- * @param integer $nb_rows the number of row to consider
+ * @param string $delimiter a CSV delimiter
+ * @param int $nb_rows the number of row to consider
*
- * @return integer
+ * @return int
*/
protected function fetchRowsCountByDelimiter($delimiter, $nb_rows = 1)
{
@@ -115,12 +115,12 @@ trait Controls
/**
* Detect the CSV file delimiter
*
- * @param integer $nb_rows
+ * @param int $nb_rows
* @param string[] $delimiters additional delimiters
*
- * @return string[]
- *
* @throws \InvalidArgumentException If $nb_rows value is invalid
+ *
+ * @return string[]
*/
public function detectDelimiterList($nb_rows = 1, array $delimiters = [])
{
@@ -149,9 +149,9 @@ trait Controls
*
* @param string $enclosure
*
- * @return $this
- *
* @throws \InvalidArgumentException If $enclosure is not a single character
+ *
+ * @return $this
*/
public function setEnclosure($enclosure = '"')
{
@@ -178,9 +178,9 @@ trait Controls
*
* @param string $escape
*
- * @return $this
- *
* @throws \InvalidArgumentException If $escape is not a single character
+ *
+ * @return $this
*/
public function setEscape($escape = "\\")
{
@@ -205,11 +205,11 @@ trait Controls
/**
* Set the Flags associated to the CSV SplFileObject
*
- * @param integer $flags
- *
- * @return $this
+ * @param int $flags
*
* @throws \InvalidArgumentException If the argument is not a valid integer
+ *
+ * @return $this
*/
public function setFlags($flags)
{
@@ -225,7 +225,7 @@ trait Controls
/**
* Returns the file Flags
*
- * @return integer
+ * @return int
*/
public function getFlags()
{
diff --git a/src/Config/StreamFilter.php b/src/Config/StreamFilter.php
index 7e02fcc..72e88f8 100644
--- a/src/Config/StreamFilter.php
+++ b/src/Config/StreamFilter.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -36,7 +36,7 @@ trait StreamFilter
/**
* Stream filtering mode to apply on all filters
*
- * @var integer
+ * @var int
*/
protected $stream_filter_mode = STREAM_FILTER_ALL;
@@ -56,8 +56,6 @@ trait StreamFilter
* a path to a file
*
* @param \SplFileObject|string $path The file path
- *
- * @return void
*/
protected function initStreamFilter($path)
{
@@ -75,8 +73,6 @@ trait StreamFilter
* Extract Available stream settings from $path
*
* @param string $path the file path
- *
- * @return void
*/
protected function extractStreamSettings($path)
{
@@ -105,8 +101,6 @@ trait StreamFilter
/**
* Check if the trait methods can be used
*
- * @return void
- *
* @throws \LogicException If the API can not be use
*/
protected function assertStreamable()
@@ -119,7 +113,7 @@ trait StreamFilter
/**
* Tells whether the stream filter capabilities can be used
*
- * @return boolean
+ * @return bool
*/
public function isActiveStreamFilter()
{
@@ -132,11 +126,11 @@ trait StreamFilter
* Set the new Stream Filter mode and remove all
* previously attached stream filters
*
- * @param integer $mode
- *
- * @return $this
+ * @param int $mode
*
* @throws \OutOfBoundsException If the mode is invalid
+ *
+ * @return $this
*/
public function setStreamFilterMode($mode)
{
@@ -154,7 +148,7 @@ trait StreamFilter
/**
* stream filter mode getter
*
- * @return integer
+ * @return int
*/
public function getStreamFilterMode()
{
@@ -213,7 +207,7 @@ trait StreamFilter
*
* @param string $filter_name
*
- * @return boolean
+ * @return bool
*/
public function hasStreamFilter($filter_name)
{
diff --git a/src/Iterator/MapIterator.php b/src/Iterator/MapIterator.php
index 19e89f4..65b3578 100644
--- a/src/Iterator/MapIterator.php
+++ b/src/Iterator/MapIterator.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
diff --git a/src/Iterator/Query.php b/src/Iterator/Query.php
index 22544b0..462e6c6 100644
--- a/src/Iterator/Query.php
+++ b/src/Iterator/Query.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -44,14 +44,14 @@ trait Query
/**
* iterator Offset
*
- * @var integer
+ * @var int
*/
protected $iterator_offset = 0;
/**
* iterator maximum length
*
- * @var integer
+ * @var int
*/
protected $iterator_limit = -1;
@@ -75,7 +75,7 @@ trait Query
/**
* Set LimitInterator Count
*
- * @param integer $limit
+ * @param int $limit
*
* @return $this
*/
@@ -146,7 +146,7 @@ trait Query
*
* @param callable $callable
*
- * @return boolean
+ * @return bool
*/
public function hasSortBy(callable $callable)
{
@@ -231,7 +231,7 @@ trait Query
*
* @param callable $callable
*
- * @return boolean
+ * @return bool
*/
public function hasFilter(callable $callable)
{
diff --git a/src/Reader.php b/src/Reader.php
index 9a0e810..03221aa 100644
--- a/src/Reader.php
+++ b/src/Reader.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -68,7 +68,7 @@ class Reader extends AbstractCsv
*
* @param callable $callable The callback function
*
- * @return integer the iteration count
+ * @return int the iteration count
*/
public function each(callable $callable)
{
@@ -86,11 +86,11 @@ class Reader extends AbstractCsv
/**
* Return a single row from the CSV
*
- * @param integer $offset
- *
- * @return array
+ * @param int $offset
*
* @throws \InvalidArgumentException If the $offset is not a valid Integer
+ *
+ * @return array
*/
public function fetchOne($offset = 0)
{
@@ -129,9 +129,9 @@ class Reader extends AbstractCsv
* @param array $keys the name for each key member
* @param callable $callable a callable function
*
- * @return array
- *
* @throws \InvalidArgumentException If the submitted keys are not integer or strng
+ *
+ * @return array
*/
public function fetchAssoc(array $keys, callable $callable = null)
{
@@ -182,12 +182,12 @@ class Reader extends AbstractCsv
*
* The callable function will be applied to each value to be return
*
- * @param integer $column_index field Index
+ * @param int $column_index field Index
* @param callable $callable a callable function
*
- * @return array
- *
* @throws \InvalidArgumentException If the column index is not a positive integer or 0
+ *
+ * @return array
*/
public function fetchColumn($column_index = 0, callable $callable = null)
{
diff --git a/src/Writer.php b/src/Writer.php
index 7958e41..762c6ac 100644
--- a/src/Writer.php
+++ b/src/Writer.php
@@ -4,7 +4,7 @@
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
-* @version 6.0.0
+* @version 6.0.1
* @package League.csv
*
* For the full copyright and license information, please view the LICENSE
@@ -45,21 +45,21 @@ class Writer extends AbstractCsv
/**
* the object current null handling mode
*
- * @var integer
+ * @var int
*/
protected $null_handling_mode = self::NULL_AS_EXCEPTION;
/**
* The number of column per row
*
- * @var integer
+ * @var int
*/
protected $columns_count = -1;
/**
* should the class detect the column count based the inserted row
*
- * @var boolean
+ * @var bool
*/
protected $detect_columns_count = false;
@@ -78,11 +78,11 @@ class Writer extends AbstractCsv
/**
* Tell the class how to handle null value
*
- * @param integer $value a Writer null behavior constant
- *vi
- * @return self
+ * @param int $value a Writer null behavior constant
*
- * @throws OutOfBoundsException If the Integer is not valid
+ * @throws \OutOfBoundsException If the Integer is not valid
+ *
+ * @return static
*/
public function setNullHandlingMode($value)
{
@@ -97,7 +97,7 @@ class Writer extends AbstractCsv
/**
* null handling getter
*
- * @return integer
+ * @return int
*/
public function getNullHandlingMode()
{
@@ -107,11 +107,11 @@ class Writer extends AbstractCsv
/**
* Set Inserted row column count
*
- * @param integer $value
- *
- * @return self
+ * @param int $value
*
* @throws \InvalidArgumentException If $value is lesser than -1
+ *
+ * @return static
*/
public function setColumnsCount($value)
{
@@ -127,7 +127,7 @@ class Writer extends AbstractCsv
/**
* Column count getter
*
- * @return integer
+ * @return int
*/
public function getColumnsCount()
{
@@ -139,7 +139,7 @@ class Writer extends AbstractCsv
* and therefore will also validate the next line whatever length it has no matter
* the current $columns_count property value.
*
- * @return self
+ * @return static
*/
public function autodetectColumnsCount()
{
@@ -155,9 +155,9 @@ class Writer extends AbstractCsv
*
* @param \Traversable|array $rows a multidimentional array or a Traversable object
*
- * @return self
- *
* @throws \InvalidArgumentException If the given rows format is invalid
+ *
+ * @return static
*/
public function insertAll($rows)
{
@@ -179,9 +179,9 @@ class Writer extends AbstractCsv
*
* @param string[]|string $data a string, an array or an object implementing to '__toString' method
*
- * @return self
- *
* @throws \InvalidArgumentException If the given row is invalid
+ *
+ * @return static
*/
public function insertOne($data)
{
@@ -203,9 +203,9 @@ class Writer extends AbstractCsv
*
* @param string[]|string $row
*
- * @return array
+ * @throws \InvalidArgumentException If the given $row is not valid
*
- * @throws InvalidArgumentException If the given $row is not valid
+ * @return array
*/
protected function validateRow($row)
{
@@ -230,9 +230,9 @@ class Writer extends AbstractCsv
* The value MUST respect the null handling mode
* The valie MUST be convertible into a string
*
- * @param mixed $value the value to be added
+ * @param string|null $value the value to be added
*
- * @return boolean
+ * @return bool
*/
protected function isConvertibleContent($value)
{
@@ -265,7 +265,7 @@ class Writer extends AbstractCsv
*
* @param array $row the row to be added to the CSV
*
- * @return boolean
+ * @return bool
*/
protected function isColumnsCountConsistent(array $row)
{
@@ -286,7 +286,7 @@ class Writer extends AbstractCsv
* insure we use the same object for insertion to
* avoid loosing the cursor position
*
- * @return SplFileObject
+ * @return \SplFileObject
*/
protected function getCsv()
{
@@ -301,7 +301,7 @@ class Writer extends AbstractCsv
/**
* Tells whether the stream filter capabilities can be used
*
- * @return boolean
+ * @return bool
*/
public function isActiveStreamFilter()
{