Skip to content

Commit

Permalink
Fix ecs error
Browse files Browse the repository at this point in the history
  • Loading branch information
donjajo committed Feb 28, 2022
1 parent 0890b34 commit 4c584eb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/JSONDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ private function check_file()
throw new \Exception('An array of json is required: Json data enclosed with []');
}
// An invalid jSON file
elseif (! is_array($content) && ! is_object($content)) {
if (! is_array($content) && ! is_object($content)) {
throw new \Exception('json is invalid');
} else {
$this->content = $content;
return true;
}
$this->content = $content;
return true;
}

public function select($args = '*')
Expand Down Expand Up @@ -200,7 +199,6 @@ public function update(array $columns)
*
* @param string $file json filename without extension
* @param array $values Array of columns as keys and values
*
*/
public function insert($file, array $values)
{
Expand Down

0 comments on commit 4c584eb

Please sign in to comment.