From e658e0338a711dfdbde587f1a75c0c9fcfaa7caa Mon Sep 17 00:00:00 2001 From: Todd Burry Date: Tue, 3 Sep 2019 21:33:24 -0400 Subject: [PATCH] Add a doc block --- src/Transformer.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Transformer.php b/src/Transformer.php index 8426276..d273a57 100644 --- a/src/Transformer.php +++ b/src/Transformer.php @@ -190,6 +190,15 @@ private function resolveControlExpression(string $expr, array $spec, array $data } } + /** + * Resolve an `$each` expression. + * + * @param array $spec The spec with teh `$each`. + * @param array $data The data being looked at. + * @param array $root The root of the data. + * @param string $path The current path. + * @return array|null Returns the resolved each or **null** if the array isn't found. + */ private function resolveEach(array $spec, array $data, array $root, string $path) { if (!array_key_exists('$each', $spec)) { throw new InvalidSpecException("Missing key \$each at $path.");