Skip to content

Commit

Permalink
Always returns a ParamBag
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoît Burnichon committed Mar 23, 2016
1 parent 1a78f76 commit 16f0762
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,11 @@ public function createData(ResourceInterface $resource, $scopeIdentifier = null,
*
* @param string $include
*
* @return \League\Fractal\ParamBag|null
* @return \League\Fractal\ParamBag
*/
public function getIncludeParams($include)
{
if (! isset($this->includeParams[$include])) {
return;
}

$params = $this->includeParams[$include];
$params = isset($this->includeParams[$include]) ? $this->includeParams[$include] : [];

return new ParamBag($params);
}
Expand Down

0 comments on commit 16f0762

Please sign in to comment.