mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
getDatatypes: Documented the need for PHP 5.5 or higher
This commit is contained in:
@@ -43,6 +43,8 @@ trait DatatypeTrait {
|
|||||||
* Check data type foreach Column
|
* Check data type foreach Column
|
||||||
* Check data type for each column and returns the most commonly.
|
* Check data type for each column and returns the most commonly.
|
||||||
*
|
*
|
||||||
|
* Requires PHP >= 5.5
|
||||||
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*
|
*
|
||||||
* @uses getDatatypeFromString
|
* @uses getDatatypeFromString
|
||||||
|
|||||||
@@ -137,6 +137,12 @@ class ParseTest extends TestCase
|
|||||||
* @depends testSepRowAutoDetection
|
* @depends testSepRowAutoDetection
|
||||||
*/
|
*/
|
||||||
public function testGetColumnDatatypes() {
|
public function testGetColumnDatatypes() {
|
||||||
|
if (!function_exists('array_column')) {
|
||||||
|
// getDatatypes requires array_column, but that
|
||||||
|
// function is only available in PHP >= 5.5
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->csv->auto(__DIR__ . '/fixtures/datatype.csv');
|
$this->csv->auto(__DIR__ . '/fixtures/datatype.csv');
|
||||||
$this->csv->getDatatypes();
|
$this->csv->getDatatypes();
|
||||||
$expected = [
|
$expected = [
|
||||||
|
|||||||
Reference in New Issue
Block a user