private function getPath()
    {
        if (($path = $this->config['path']) instanceof \Closure) {
            $this->line('Generating dynamic download path.');
            $this->line('');
            if (is_numeric($path = $path($this))) {
                exit($path);
            }
            $this->line('');
        }

        if (!is_string($path)) {
            $this->error('Path has not been provided as a string.');
            $this->line('');
            $this->line('');

            exit(1);
        }

        return $path;
    }
private function getPath()
    {
        if (($path = $this->config['path']) instanceof \Closure) {
            $this->line('Generating dynamic download path.');
            $this->line('');
            if (is_numeric($path = $path($this))) {
                exit($path);
            }
            $this->line('');
        }

        if (!is_string($path)) {
            $this->error('Path has not been provided as a string.');
            $this->line('');
            $this->line('');

            exit(1);
        }

        return $path;
    }
private function getPath ( ) { if ( ( $ path = $ this -> config [ 'path' ] ) instanceof \ Closure ) { $ this -> line ( 'Generating dynamic download path.' ) ; $ this -> line ( '' ) ; if ( is_numeric ( $ path = $ path ( $ this ) ) ) { exit ( $ path ) ; } $ this -> line ( '' ) ; } if ( ! is_string ( $ path ) ) { $ this -> error ( 'Path has not been provided as a string.' ) ; $ this -> line ( '' ) ; $ this -> line ( '' ) ; exit ( 1 ) ; } return $ path ; }
Get path from string or via a closure.

@return string

@SuppressWarnings(PHPMD.ExitExpression)
Get path from string or via a closure .