Skip to content

Commit

Permalink
Merge pull request #1 from MBoretto/develop
Browse files Browse the repository at this point in the history
remove unuseful callback
  • Loading branch information
esbenp authored Jan 10, 2017
2 parents db12294 + 8ea1982 commit b1e869b
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 b1e869b

Please sign in to comment.