Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
esvit committed Oct 17, 2013
1 parent 2202167 commit 292dd5e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Bazalt/Rest/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public function exec($params = [])
$this->collection->countPerPage((int)$params['count']);
}

public function fetch($params = [], $callback = null, $className = null)
public function fetch($params = array(), $callback = null, $className = null)
{
$this->exec($params);

$return = [];
$return = array();
$result = $this->collection->fetchPage($className);

foreach ($result as $k => $item) {
Expand All @@ -109,15 +109,15 @@ public function fetch($params = [], $callback = null, $className = null)
$return[$k] = $res;
}

$data = [
$data = array(
'data' => $return,
'pager' => [
'pager' => array(
'current' => $this->collection->page(),
'count' => $this->collection->getPagesCount(),
'total' => $this->collection->count(),
'countPerPage' => $this->collection->countPerPage()
]
];
)
);
//$data['sql'] = $this->collection->toSQL();
return $data;
}
Expand Down

0 comments on commit 292dd5e

Please sign in to comment.