From 7051ba4d5f124ae0f2351c7b6535b0f6fd92a57f Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 1 Feb 2017 12:23:07 +0000 Subject: [PATCH] Rewrote Walk strategy as Delegate. --- src/Strategy/Walk.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Strategy/Walk.php b/src/Strategy/Walk.php index 9fe367e..2af56d0 100644 --- a/src/Strategy/Walk.php +++ b/src/Strategy/Walk.php @@ -1,18 +1,17 @@ expression = $expression; + $this->copy = new Copy($path); } public function __invoke($data, $context = null) { - return parent::__invoke($this->getMapper()->map($data, $this->expression, $context), $context); + return call_user_func($this->copy, parent::__invoke($data, $context), $context); } }