private function saveRemoteFile($fileUrl, $filePath)
    {
        if (! $file = @file_get_contents($fileUrl)) {
            self::$errors[] = [
                'message' => 'Error to download file: ' . $fileUrl
            ];

            return false;
        }

        if (! @file_put_contents($filePath, $file)) {
            self::$errors[] = [
                'message' => 'Failed to save file to: ' . $filePath
            ];

            return false;
        }

        return true;
    }
private function saveRemoteFile($fileUrl, $filePath)
    {
        if (! $file = @file_get_contents($fileUrl)) {
            self::$errors[] = [
                'message' => 'Error to download file: ' . $fileUrl
            ];

            return false;
        }

        if (! @file_put_contents($filePath, $file)) {
            self::$errors[] = [
                'message' => 'Failed to save file to: ' . $filePath
            ];

            return false;
        }

        return true;
    }
private function saveRemoteFile ( $ fileUrl , $ filePath ) { if ( ! $ file = @ file_get_contents ( $ fileUrl ) ) { self :: $ errors [ ] = [ 'message' => 'Error to download file: ' . $ fileUrl ] ; return false ; } if ( ! @ file_put_contents ( $ filePath , $ file ) ) { self :: $ errors [ ] = [ 'message' => 'Failed to save file to: ' . $ filePath ] ; return false ; } return true ; }
Save remote file.

@param string $fileUrl  → remote file url
@param string $filePath → file path to save

@return bool
Save remote file .