src/Incoming/Structure/RecursiveInputStructureFactory.php
private static function attemptBuildTraversableLike($data)
    {
        if (is_array($data) || $data instanceof Traversable) {
            $data = static::buildFromTraversableLike($data);
        }

        return $data;
    }
private static function attemptBuildTraversableLike($data)
    {
        if (is_array($data) || $data instanceof Traversable) {
            $data = static::buildFromTraversableLike($data);
        }

        return $data;
    }
private static function attemptBuildTraversableLike ( $ data ) { if ( is_array ( $ data ) || $ data instanceof Traversable ) { $ data = static :: buildFromTraversableLike ( $ data ) ; } return $ data ; }
Attempt to build a structure from "Traversable-like" data.

If the data type isn't supported, we simply return the original data
untouched. This allows to more easily traverse deeply nested structures.

@param mixed $data The input data.
@return Structure|mixed The built structure or original data.
Attempt to build a structure from Traversable - like data .