Completed
Pull Request — master (#160)
by Lito
02:33
created
src/Dropbox/Dropbox.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -484,17 +484,17 @@  discard block
 block discarded – undo
484 484
         return $this->makeModelFromResponse($response);
485 485
     }
486 486
 
487
-	/**
488
-     * Search a folder for files/folders
489
-     *
490
-     * @param  string $path   Path to search
491
-     * @param  string $query  Search Query
492
-     * @param  array  $params Additional Params
493
-     *
494
-     * @link https://www.dropbox.com/developers/documentation/http/documentation#files-search
495
-     *
496
-     * @return \Kunnu\Dropbox\Models\SearchResults
497
-     */
487
+ /**
488
+  * Search a folder for files/folders
489
+  *
490
+  * @param  string $path   Path to search
491
+  * @param  string $query  Search Query
492
+  * @param  array  $params Additional Params
493
+  *
494
+  * @link https://www.dropbox.com/developers/documentation/http/documentation#files-search
495
+  *
496
+  * @return \Kunnu\Dropbox\Models\SearchResults
497
+  */
498 498
     public function searchV2($query, array $params = [])
499 499
     {
500 500
         //Specify the root folder as an
@@ -506,9 +506,9 @@  discard block
 block discarded – undo
506 506
         //Set the path and query
507 507
         $params['query'] = $query;
508 508
 
509
-		if( !array_key_exists( 'include_highlights', $params ) ){
510
-			$params['include_highlights'] = false;
511
-		}
509
+  if( !array_key_exists( 'include_highlights', $params ) ){
510
+   $params['include_highlights'] = false;
511
+  }
512 512
 
513 513
         //Fetch Search Results
514 514
         $response = $this->postToAPI('/files/search_v2', $params);
@@ -1282,41 +1282,41 @@  discard block
 block discarded – undo
1282 1282
         return new File($metadata, $contents);
1283 1283
     }
1284 1284
 
1285
-	/**
1286
-	 * Download a folder as a zip file
1287
-	 *
1288
-	 * @param  string                  $path        Path to the file you want to download
1289
-	 * @param  null|string|DropboxFile $dropboxFile DropboxFile object or Path to target file
1290
-	 *
1291
-	 * @return \Kunnu\Dropbox\Models\File
1292
-	 *
1293
-	 * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
1294
-	 *
1295
-	 * @link https://www.dropbox.com/developers/documentation/http/documentation#files-download_zip
1296
-	 *
1297
-	 */
1298
-	 public function downloadZip($path, $dropboxFile = null)
1299
-	 {
1300
-		 //Path cannot be null
1301
-		 if (is_null($path)) {
1302
-			 throw new DropboxClientException("Path cannot be null.");
1303
-		 }
1304
-
1305
-		 //Make Dropbox File if target is specified
1306
-		 $dropboxFile = $dropboxFile ? $this->makeDropboxFile($dropboxFile, null, null, DropboxFile::MODE_WRITE) : null;
1307
-
1308
-		 //Download File
1309
-		 $response = $this->postToContent('/files/download_zip', ['path' => $path], null, $dropboxFile);
1310
-
1311
-		 //Get file metadata from response headers
1312
-		 $metadata = $this->getMetadataFromResponseHeaders($response);
1313
-
1314
-		 //File Contents
1315
-		 $contents = $dropboxFile ? $this->makeDropboxFile($dropboxFile) : $response->getBody();
1316
-
1317
-		 //Make and return a File model
1318
-		 return new File($metadata, $contents);
1319
-	}
1285
+ /**
1286
+  * Download a folder as a zip file
1287
+  *
1288
+  * @param  string                  $path        Path to the file you want to download
1289
+  * @param  null|string|DropboxFile $dropboxFile DropboxFile object or Path to target file
1290
+  *
1291
+  * @return \Kunnu\Dropbox\Models\File
1292
+  *
1293
+  * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
1294
+  *
1295
+  * @link https://www.dropbox.com/developers/documentation/http/documentation#files-download_zip
1296
+  *
1297
+  */
1298
+  public function downloadZip($path, $dropboxFile = null)
1299
+  {
1300
+   //Path cannot be null
1301
+   if (is_null($path)) {
1302
+    throw new DropboxClientException("Path cannot be null.");
1303
+   }
1304
+
1305
+   //Make Dropbox File if target is specified
1306
+   $dropboxFile = $dropboxFile ? $this->makeDropboxFile($dropboxFile, null, null, DropboxFile::MODE_WRITE) : null;
1307
+
1308
+   //Download File
1309
+   $response = $this->postToContent('/files/download_zip', ['path' => $path], null, $dropboxFile);
1310
+
1311
+   //Get file metadata from response headers
1312
+   $metadata = $this->getMetadataFromResponseHeaders($response);
1313
+
1314
+   //File Contents
1315
+   $contents = $dropboxFile ? $this->makeDropboxFile($dropboxFile) : $response->getBody();
1316
+
1317
+   //Make and return a File model
1318
+   return new File($metadata, $contents);
1319
+ }
1320 1320
 
1321 1321
     /**
1322 1322
      * Get Current Account
Please login to merge, or discard this patch.