protected function commandCallback($callback)
    {
        return (
            function ($output) use ($callback) {
                $this->output .= $output;
                if (is_callable($callback)) {
                    return call_user_func($callback, $output);
                }
            }
        );
    }
protected function commandCallback($callback)
    {
        return (
            function ($output) use ($callback) {
                $this->output .= $output;
                if (is_callable($callback)) {
                    return call_user_func($callback, $output);
                }
            }
        );
    }
protected function commandCallback ( $ callback ) { return ( function ( $ output ) use ( $ callback ) { $ this -> output .= $ output ; if ( is_callable ( $ callback ) ) { return call_user_func ( $ callback , $ output ) ; } } ) ; }
Wrap the callback so we can print the output.

@param callable $callback
The callback to wrap.
Wrap the callback so we can print the output .