Skip to content

Commit

Permalink
Add a doc block
Browse files Browse the repository at this point in the history
  • Loading branch information
tburry committed Sep 4, 2019
1 parent ac30cb6 commit e658e03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit e658e03

Please sign in to comment.