Skip to content

Commit

Permalink
updates parseRequestTrait to accept array and not Request for reusabi…
Browse files Browse the repository at this point in the history
…lity
  • Loading branch information
Matt Cockayne committed Sep 24, 2015
1 parent 80ecbbb commit 3821c13
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Zucchi/Controller/RequestParserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait RequestParserTrait
* a format usable by the getList() method of the services.
* @return array
*/
protected function parseWhere(Request $request)
protected function parseWhere(array $where = array())
{
$clauses = array(
'is' => 'is',
Expand All @@ -32,8 +32,6 @@ protected function parseWhere(Request $request)
'regex' => 'regexp',
);

$where = $request->getQuery('where', array());

// loop through and sanitize the where statement
foreach ($where as $field => &$value) {
if (is_array($value)) {
Expand Down

0 comments on commit 3821c13

Please sign in to comment.