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; } }