private function downloadPath($path)
    {
        $this->info(sprintf('Downloading \'%s\'...', $path));
        $this->line('');

        // Get the file from FTP path
        if (stripos($path, 'ftp://') !== false) {
            return file_get_contents($path);
        }

        $client = new GuzzleClient();
        $res = $client->request('GET', $path);
        $code = $res->getStatusCode();

        // Download has occurred
        if ($code == 200) {
            return $res->getBody();
        }

        $this->error('Failed to download.');
        $this->line('');
        $this->line('');

        exit(1);
    }
private function downloadPath($path)
    {
        $this->info(sprintf('Downloading \'%s\'...', $path));
        $this->line('');

        // Get the file from FTP path
        if (stripos($path, 'ftp://') !== false) {
            return file_get_contents($path);
        }

        $client = new GuzzleClient();
        $res = $client->request('GET', $path);
        $code = $res->getStatusCode();

        // Download has occurred
        if ($code == 200) {
            return $res->getBody();
        }

        $this->error('Failed to download.');
        $this->line('');
        $this->line('');

        exit(1);
    }
private function downloadPath ( $ path ) { $ this -> info ( sprintf ( 'Downloading \'%s\'...' , $ path ) ) ; $ this -> line ( '' ) ; // Get the file from FTP path if ( stripos ( $ path , 'ftp://' ) !== false ) { return file_get_contents ( $ path ) ; } $ client = new GuzzleClient ( ) ; $ res = $ client -> request ( 'GET' , $ path ) ; $ code = $ res -> getStatusCode ( ) ; // Download has occurred if ( $ code == 200 ) { return $ res -> getBody ( ) ; } $ this -> error ( 'Failed to download.' ) ; $ this -> line ( '' ) ; $ this -> line ( '' ) ; exit ( 1 ) ; }
Download the file from the path.

@param string $path

@return string

@SuppressWarnings(PHPMD.ExitExpression)
Download the file from the path .