Completed
Pull Request — master (#160)
by Lito
01:42
created
src/Dropbox/Models/SearchResult.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * Indicates what type of match was found for the result
51 51
      *
52
-     * @return bool
52
+     * @return string
53 53
      */
54 54
     public function getMatchType()
55 55
     {
Please login to merge, or discard this patch.
src/Dropbox/DropboxClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     protected function buildAuthHeader($accessToken = "")
95 95
     {
96
-        return ['Authorization' => 'Bearer '. $accessToken];
96
+        return ['Authorization' => 'Bearer ' . $accessToken];
97 97
     }
98 98
 
99 99
     /**
Please login to merge, or discard this patch.
src/Dropbox/Dropbox.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1147,7 +1147,7 @@
 block discarded – undo
1147 1147
 
1148 1148
             //Since the metadata is returned as a json string
1149 1149
             //it needs to be decoded into an associative array
1150
-            $metadata = json_decode((string)$data, true);
1150
+            $metadata = json_decode((string) $data, true);
1151 1151
         }
1152 1152
 
1153 1153
         //Return the metadata
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1203,41 +1203,41 @@
 block discarded – undo
1203 1203
         return new File($metadata, $contents);
1204 1204
     }
1205 1205
 
1206
-	/**
1207
-	 * Download a folder as a zip file
1208
-	 *
1209
-	 * @param  string                  $path        Path to the file you want to download
1210
-	 * @param  null|string|DropboxFile $dropboxFile DropboxFile object or Path to target file
1211
-	 *
1212
-	 * @return \Kunnu\Dropbox\Models\File
1213
-	 *
1214
-	 * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
1215
-	 *
1216
-	 * @link https://www.dropbox.com/developers/documentation/http/documentation#files-download_zip
1217
-	 *
1218
-	 */
1219
-	 public function downloadZip($path, $dropboxFile = null)
1220
-	 {
1221
-		 //Path cannot be null
1222
-		 if (is_null($path)) {
1223
-			 throw new DropboxClientException("Path cannot be null.");
1224
-		 }
1225
-
1226
-		 //Make Dropbox File if target is specified
1227
-		 $dropboxFile = $dropboxFile ? $this->makeDropboxFile($dropboxFile, null, null, DropboxFile::MODE_WRITE) : null;
1228
-
1229
-		 //Download File
1230
-		 $response = $this->postToContent('/files/download_zip', ['path' => $path], null, $dropboxFile);
1231
-
1232
-		 //Get file metadata from response headers
1233
-		 $metadata = $this->getMetadataFromResponseHeaders($response);
1234
-
1235
-		 //File Contents
1236
-		 $contents = $dropboxFile ? $this->makeDropboxFile($dropboxFile) : $response->getBody();
1237
-
1238
-		 //Make and return a File model
1239
-		 return new File($metadata, $contents);
1240
-	}
1206
+ /**
1207
+  * Download a folder as a zip file
1208
+  *
1209
+  * @param  string                  $path        Path to the file you want to download
1210
+  * @param  null|string|DropboxFile $dropboxFile DropboxFile object or Path to target file
1211
+  *
1212
+  * @return \Kunnu\Dropbox\Models\File
1213
+  *
1214
+  * @throws \Kunnu\Dropbox\Exceptions\DropboxClientException
1215
+  *
1216
+  * @link https://www.dropbox.com/developers/documentation/http/documentation#files-download_zip
1217
+  *
1218
+  */
1219
+  public function downloadZip($path, $dropboxFile = null)
1220
+  {
1221
+   //Path cannot be null
1222
+   if (is_null($path)) {
1223
+    throw new DropboxClientException("Path cannot be null.");
1224
+   }
1225
+
1226
+   //Make Dropbox File if target is specified
1227
+   $dropboxFile = $dropboxFile ? $this->makeDropboxFile($dropboxFile, null, null, DropboxFile::MODE_WRITE) : null;
1228
+
1229
+   //Download File
1230
+   $response = $this->postToContent('/files/download_zip', ['path' => $path], null, $dropboxFile);
1231
+
1232
+   //Get file metadata from response headers
1233
+   $metadata = $this->getMetadataFromResponseHeaders($response);
1234
+
1235
+   //File Contents
1236
+   $contents = $dropboxFile ? $this->makeDropboxFile($dropboxFile) : $response->getBody();
1237
+
1238
+   //Make and return a File model
1239
+   return new File($metadata, $contents);
1240
+ }
1241 1241
 
1242 1242
     /**
1243 1243
      * Get Current Account
Please login to merge, or discard this patch.
src/Dropbox/Http/Clients/DropboxGuzzleHttpClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         } catch (RequestException $e) {
61 61
             $rawResponse = $e->getResponse();
62 62
 
63
-            if (! $rawResponse instanceof ResponseInterface) {
63
+            if (!$rawResponse instanceof ResponseInterface) {
64 64
                 throw new DropboxClientException($e->getMessage(), $e->getCode());
65 65
             }
66 66
         }
Please login to merge, or discard this patch.