src/Utilities/Helper.php
public static function castToArray($param)
    {
        if ($param instanceof \stdClass) {
            $param = (array) $param;

            return $param;
        }

        if ($param instanceof Arrayable) {
            return $param->toArray();
        }

        return $param;
    }
public static function castToArray($param)
    {
        if ($param instanceof \stdClass) {
            $param = (array) $param;

            return $param;
        }

        if ($param instanceof Arrayable) {
            return $param->toArray();
        }

        return $param;
    }
public static function castToArray ( $ param ) { if ( $ param instanceof \ stdClass ) { $ param = ( array ) $ param ; return $ param ; } if ( $ param instanceof Arrayable ) { return $ param -> toArray ( ) ; } return $ param ; }
Cast the parameter into an array.

@param mixed $param
@return array
Cast the parameter into an array .