From 936b6f4a50be616cea74f5f267d0fd6f245facc5 Mon Sep 17 00:00:00 2001 From: William Knauss Date: Thu, 5 Jun 2014 20:34:08 -0400 Subject: [PATCH] parse --- parsecsv.lib.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parsecsv.lib.php b/parsecsv.lib.php index 08d7e01..9ec6017 100644 --- a/parsecsv.lib.php +++ b/parsecsv.lib.php @@ -391,24 +391,24 @@ class parseCSV { * @return [bool] */ public function parse ($input = null, $offset = null, $limit = null, $conditions = null) { - if ( $input === null ) { + if (is_null($input)) { $input = $this->file; } - if ( !empty($input) ) { - if ( $offset !== null ) { + if (!empty($input)) { + if (!is_null($offset)) { $this->offset = $offset; } - if ($limit !== null ) { + if (!is_null($limit)) { $this->limit = $limit; } - if ( !is_null($conditions) ) { + if (!is_null($conditions)) { $this->conditions = $conditions; } - if ( is_readable($input) ) { + if (is_readable($input)) { $this->data = $this->parse_file($input); } else { @@ -416,7 +416,7 @@ class parseCSV { $this->data = $this->parse_string(); } - if ( $this->data === false ) { + if ($this->data === false) { return false; } }