Skip to content

Commit

Permalink
return null when data not found
Browse files Browse the repository at this point in the history
  • Loading branch information
nahid authored Jul 20, 2017
1 parent 42aa9c9 commit 3460dbc
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/JsonManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class JsonManager
'>' => 'greater',
'<' => 'less',
'>=' => 'greaterEqual',
'<=' => 'lessEqual',
'LIKE' => 'like'
'<=' => 'lessEqual'
];

/**
Expand Down Expand Up @@ -145,6 +144,10 @@ public function makeUniqueName($prefix='jsonq', $hash=false)
protected function processConditions()
{
$data = $this->getData();
if (!$data) {
return null;
}

if (is_string($data)) {
return $data;
}
Expand Down Expand Up @@ -264,12 +267,5 @@ protected function condLessEqual($key, $val)
return true;
}
}

protected function condLike($key, $val)
{
if (stripos($key, $val) !== false) {
return true;
}
}

}

0 comments on commit 3460dbc

Please sign in to comment.