@@ -10,30 +10,30 @@ class Mapper
1010{
1111 /**
1212 * @param array $record
13- * @param Strategy|Mapping|array|mixed $strategyOrMapping
13+ * @param Strategy|Mapping|array|mixed $expression
1414 * @param mixed $context
1515 *
1616 * @return mixed
1717 *
18- * @throws InvalidMapperTypeException An invalid strategy or mapping object was specified.
18+ * @throws InvalidExpressionException An invalid strategy or mapping object was specified.
1919 */
20- public function map (array $ record , $ strategyOrMapping , $ context = null )
20+ public function map (array $ record , $ expression , $ context = null )
2121 {
2222 /* Strategy. */
23- if ($ strategyOrMapping instanceof Strategy) {
24- return $ this ->mapStrategy ($ record , $ strategyOrMapping , $ context );
23+ if ($ expression instanceof Strategy) {
24+ return $ this ->mapStrategy ($ record , $ expression , $ context );
2525 } /* Mapping. */
26- elseif ($ strategyOrMapping instanceof Mapping) {
27- return $ this ->mapMapping ($ record , $ strategyOrMapping , $ context );
26+ elseif ($ expression instanceof Mapping) {
27+ return $ this ->mapMapping ($ record , $ expression , $ context );
2828 } /* Mapping fragment. */
29- elseif (is_array ($ strategyOrMapping )) {
30- return $ this ->mapFragment ($ record , $ strategyOrMapping , $ context );
29+ elseif (is_array ($ expression )) {
30+ return $ this ->mapFragment ($ record , $ expression , $ context );
3131 } /* Scalar values. */
32- elseif (is_scalar ($ strategyOrMapping )) {
33- return $ strategyOrMapping ;
32+ elseif (is_scalar ($ expression )) {
33+ return $ expression ;
3434 }
3535
36- throw new InvalidMapperTypeException ('Invalid strategy or mapping: " ' . get_class ($ strategyOrMapping ) . '". ' );
36+ throw new InvalidExpressionException ('Invalid strategy or mapping: " ' . get_class ($ expression ) . '". ' );
3737 }
3838
3939 /**
0 commit comments