Skip to content

Commit 1336434

Browse files
committed
#27 reverted to untyped parameter in fetchAll(), but added missing type to docblock
Signed-off-by: Pascal Paulis <ppaulis@gmail.com>
1 parent 434d4bc commit 1336434

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AbstractResourceListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function dispatch(ResourceEvent $event)
181181
$id = $event->getParam('id', null);
182182
return $this->fetch($id);
183183
case 'fetchAll':
184-
$queryParams = $event->getQueryParams() ?: new Parameters();
184+
$queryParams = $event->getQueryParams() ?: [];
185185
return $this->fetchAll($queryParams);
186186
case 'patch':
187187
$id = $event->getParam('id', null);
@@ -253,10 +253,10 @@ public function fetch($id)
253253
/**
254254
* Fetch all or a subset of resources
255255
*
256-
* @param Parameters $params
256+
* @param array|Parameters $params
257257
* @return ApiProblem|mixed
258258
*/
259-
public function fetchAll(Parameters $params)
259+
public function fetchAll($params = [])
260260
{
261261
return new ApiProblem(405, 'The GET method has not been defined for collections');
262262
}

0 commit comments

Comments
 (0)