src/SellerLabs/Nucleus/Data/Factories/ComplexFactory.php
public static function toLeftFoldable($input)
    {
        Arguments::define(Boa::leftFoldable())->check($input);

        if ($input instanceof LeftFoldableInterface) {
            return $input;
        }

        if (is_array($input) || $input instanceof ArrayObject) {
            return static::toList($input);
        }

        if ($input instanceof Traversable) {
            return new TraversableLeftFoldable($input);
        }

        throw new CoreException('Unable to build LeftFoldable');
    }
public static function toLeftFoldable($input)
    {
        Arguments::define(Boa::leftFoldable())->check($input);

        if ($input instanceof LeftFoldableInterface) {
            return $input;
        }

        if (is_array($input) || $input instanceof ArrayObject) {
            return static::toList($input);
        }

        if ($input instanceof Traversable) {
            return new TraversableLeftFoldable($input);
        }

        throw new CoreException('Unable to build LeftFoldable');
    }
public static function toLeftFoldable ( $ input ) { Arguments :: define ( Boa :: leftFoldable ( ) ) -> check ( $ input ) ; if ( $ input instanceof LeftFoldableInterface ) { return $ input ; } if ( is_array ( $ input ) || $ input instanceof ArrayObject ) { return static :: toList ( $ input ) ; } if ( $ input instanceof Traversable ) { return new TraversableLeftFoldable ( $ input ) ; } throw new CoreException ( 'Unable to build LeftFoldable' ) ; }
Wrap the provided value inside a LeftFoldable.

@param array|ArrayObject|Traversable|LeftFoldableInterface $input

@return ArrayList|TraversableLeftFoldable
@throws CoreException
@throws InvalidArgumentException
Wrap the provided value inside a LeftFoldable .