Test Setup Failed
Push — master ( 2f4ef8...983b8f )
by Kunal
03:30
created
src/Dropbox/Http/Clients/DropboxGuzzleHttpClient.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     /**
85 85
      * Get the Response Body
86 86
      *
87
-     * @param string|\Psr\Http\Message\ResponseInterface $response Response object
87
+     * @param ResponseInterface $response Response object
88 88
      *
89 89
      * @return string
90 90
      */
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@
 block discarded – undo
2 2
 namespace Kunnu\Dropbox\Http\Clients;
3 3
 
4 4
 use GuzzleHttp\Client;
5
-use GuzzleHttp\Psr7\Request;
6
-use Psr\Http\Message\StreamInterface;
7
-use Psr\Http\Message\ResponseInterface;
8 5
 use GuzzleHttp\Exception\RequestException;
9
-use Kunnu\Dropbox\Http\DropboxRawResponse;
6
+use GuzzleHttp\Psr7\Request;
10 7
 use Kunnu\Dropbox\Exceptions\DropboxClientException;
8
+use Kunnu\Dropbox\Http\DropboxRawResponse;
9
+use Psr\Http\Message\ResponseInterface;
10
+use Psr\Http\Message\StreamInterface;
11 11
 
12 12
 /**
13 13
  * DropboxGuzzleHttpClient
Please login to merge, or discard this patch.
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/Authentication/OAuth2Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
             'state' => $state,
116 116
             ], $params);
117 117
 
118
-        if(!is_null($redirectUri)) {
118
+        if (!is_null($redirectUri)) {
119 119
             $params['redirect_uri'] = $redirectUri;
120 120
         }
121 121
 
Please login to merge, or discard this patch.
src/Dropbox/DropboxResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
         $body = $this->getBody();
158 158
 
159 159
         if (isset($this->headers['Content-Type']) && in_array('application/json', $this->headers['Content-Type'])) {
160
-            $this->decodedBody = json_decode((string)$body, true);
160
+            $this->decodedBody = json_decode((string) $body, true);
161 161
         } else {
162 162
             $this->decodedBody = $this->body;
163 163
         }
Please login to merge, or discard this patch.
src/Dropbox/DropboxRequest.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
      /**
115
-     * Get the Request Params
116
-     *
117
-     * @return array
118
-     */
115
+      * Get the Request Params
116
+      *
117
+      * @return array
118
+      */
119 119
     public function getParams()
120 120
     {
121 121
         return $this->params;
@@ -196,12 +196,12 @@  discard block
 block discarded – undo
196 196
     }
197 197
 
198 198
      /**
199
-     * Set the Request Params
200
-     *
201
-     * @param array
202
-     *
203
-     * @return \Kunnu\Dropbox\DropboxRequest
204
-     */
199
+      * Set the Request Params
200
+      *
201
+      * @param array
202
+      *
203
+      * @return \Kunnu\Dropbox\DropboxRequest
204
+      */
205 205
      public function setParams(array $params = [])
206 206
      {
207 207
          //Process Params
Please login to merge, or discard this patch.
src/Dropbox/Dropbox.php 3 patches
Unused Use Statements   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Kunnu\Dropbox;
3 3
 
4
-use Kunnu\Dropbox\Models\File;
4
+use Kunnu\Dropbox\Authentication\DropboxAuthHelper;
5
+use Kunnu\Dropbox\Authentication\OAuth2Client;
6
+use Kunnu\Dropbox\Exceptions\DropboxClientException;
7
+use Kunnu\Dropbox\Http\Clients\DropboxHttpClientFactory;
5 8
 use Kunnu\Dropbox\Models\Account;
6
-use Kunnu\Dropbox\Models\Thumbnail;
7 9
 use Kunnu\Dropbox\Models\AccountList;
8
-use Kunnu\Dropbox\Models\ModelFactory;
9
-use Kunnu\Dropbox\Models\FileMetadata;
10 10
 use Kunnu\Dropbox\Models\CopyReference;
11
+use Kunnu\Dropbox\Models\File;
12
+use Kunnu\Dropbox\Models\FileMetadata;
11 13
 use Kunnu\Dropbox\Models\FolderMetadata;
12 14
 use Kunnu\Dropbox\Models\ModelCollection;
13
-use Kunnu\Dropbox\Authentication\OAuth2Client;
14
-use Kunnu\Dropbox\Store\PersistentDataStoreFactory;
15
-use Kunnu\Dropbox\Authentication\DropboxAuthHelper;
16
-use Kunnu\Dropbox\Exceptions\DropboxClientException;
15
+use Kunnu\Dropbox\Models\ModelFactory;
16
+use Kunnu\Dropbox\Models\Thumbnail;
17 17
 use Kunnu\Dropbox\Security\RandomStringGeneratorFactory;
18
-use Kunnu\Dropbox\Http\Clients\DropboxHttpClientFactory;
18
+use Kunnu\Dropbox\Store\PersistentDataStoreFactory;
19 19
 
20 20
 /**
21 21
  * Dropbox
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
     /**
817 817
      * Upload file in sessions/chunks
818 818
      *
819
-     * @param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
819
+     * @param  DropboxFile $dropboxFile DropboxFile object or Path to file
820 820
      * @param  string             $path        Path to save the file to, on Dropbox
821 821
      * @param  int                $fileSize    The size of the file
822 822
      * @param  int                $chunkSize   The amount of data to upload in each chunk
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
     /**
882 882
      * Start an Upload Session
883 883
      *
884
-     * @param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
884
+     * @param  string $dropboxFile DropboxFile object or Path to file
885 885
      * @param  int                $chunkSize   Size of file chunk to upload
886 886
      * @param  boolean            $close       Closes the session for "appendUploadSession"
887 887
      *
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
     /**
935 935
      * Append more data to an Upload Session
936 936
      *
937
-     * @param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
937
+     * @param  DropboxFile $dropboxFile DropboxFile object or Path to file
938 938
      * @param  string             $sessionId   Session ID returned by `startUploadSession`
939 939
      * @param  int                $offset      The amount of data that has been uploaded so far
940 940
      * @param  int                $chunkSize   The amount of data to upload
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
     /**
984 984
      * Finish an upload session and save the uploaded data to the given file path
985 985
      *
986
-     * @param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
986
+     * @param  DropboxFile $dropboxFile DropboxFile object or Path to file
987 987
      * @param  string             $sessionId   Session ID returned by `startUploadSession`
988 988
      * @param  int                $offset      The amount of data that has been uploaded so far
989 989
      * @param  int                $remaining   The amount of data that is remaining
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
     /**
1032 1032
      * Upload a File to Dropbox in a single request
1033 1033
      *
1034
-     * @param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
1034
+     * @param  DropboxFile $dropboxFile DropboxFile object or Path to file
1035 1035
      * @param  string             $path        Path to upload the file to
1036 1036
      * @param  array              $params      Additional Params
1037 1037
      *
Please login to merge, or discard this patch.
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.