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

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

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

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

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

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

        throw new CoreException('Unable to build Foldable');
    }
public static function toFoldable ( $ input ) { Arguments :: define ( Boa :: foldable ( ) ) -> check ( $ input ) ; if ( $ input instanceof FoldableInterface ) { return $ input ; } if ( is_array ( $ input ) || $ input instanceof ArrayObject ) { return static :: toList ( $ input ) ; } throw new CoreException ( 'Unable to build Foldable' ) ; }
Wrap provided value inside a Foldable.

@param array|ArrayObject|FoldableInterface $input

@return ArrayList
@throws CoreException
@throws InvalidArgumentException
Wrap provided value inside a Foldable .