src/Kisma/Core/Utility/Option.php
public static function clean( $array = null, $callback = null )
    {
        $_result = ( empty( $array ) ? array() : ( !is_array( $array ) ? array($array) : $array ) );

        if ( null === $callback || !is_callable( $callback ) )
        {
            return $_result;
        }

        $_response = array();

        foreach ( $_result as $_item )
        {
            $_response[] = call_user_func( $callback, $_item );
        }

        return $_response;
    }
public static function clean( $array = null, $callback = null )
    {
        $_result = ( empty( $array ) ? array() : ( !is_array( $array ) ? array($array) : $array ) );

        if ( null === $callback || !is_callable( $callback ) )
        {
            return $_result;
        }

        $_response = array();

        foreach ( $_result as $_item )
        {
            $_response[] = call_user_func( $callback, $_item );
        }

        return $_response;
    }
public static function clean ( $ array = null , $ callback = null ) { $ _result = ( empty ( $ array ) ? array ( ) : ( ! is_array ( $ array ) ? array ( $ array ) : $ array ) ) ; if ( null === $ callback || ! is_callable ( $ callback ) ) { return $ _result ; } $ _response = array ( ) ; foreach ( $ _result as $ _item ) { $ _response [ ] = call_user_func ( $ callback , $ _item ) ; } return $ _response ; }
Ensures the argument passed in is actually an array with optional iteration callback

@static

@param array             $array
@param callable|\Closure $callback

@return array
Ensures the argument passed in is actually an array with optional iteration callback