Refactor internal transformer methods to be more strict #256

Closed
wants to merge 1 commit into
from
Commits on Mar 27, 2013
  1. @jmikola

    Refactor internal transformer methods to be more strict

    jmikola committed Mar 27, 2013
    Be strict about incoming values to transformNested(). 82ec81c introduced support a non-iterable $objects parameter, and proxied to transform(). This method should never be called in that case, so throwing an exception should allow us to catch bad logic or mappings.
    
    Additionally, do not accept ArrayAccess objects when we expect an iterable value. Support for ArrayAccess in normalizeValue() dates back to 0db0490 (likely an oversight).
    
    Lastly, use an equality check instead of calling is_null(), as it is more efficient.