Skip to content

Commit

Permalink
remove unuseful callback
Browse files Browse the repository at this point in the history
  • Loading branch information
MBoretto committed Jan 9, 2017
1 parent db12294 commit 8ea1982
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Onion.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function toArray()
private function createCoreFunction(Closure $core)
{
return function($object) use($core) {
return call_user_func($core, $object);
return $core($object);
};
}

Expand All @@ -98,7 +98,7 @@ private function createCoreFunction(Closure $core)
private function createLayer($nextLayer, $layer)
{
return function($object) use($nextLayer, $layer){
return call_user_func_array([$layer, 'peel'], [$object, $nextLayer]);
return $layer->peel($object, $nextLayer);
};
}

Expand Down

0 comments on commit 8ea1982

Please sign in to comment.