Test Setup Failed
Pull Request — master (#72)
by
unknown
01:24
created
src/Upyun/Upyun.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @return mixed
136 136
      * @throws \Exception
137 137
      */
138
-    public function initiateMultipartUpload($path, $size, $params=[])
138
+    public function initiateMultipartUpload($path, $size, $params = [])
139 139
     {
140 140
         $upload = new Uploader($this->config);
141 141
         return $upload->initiateMultipartUpload($path, $size, $params);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $params = Util::getHeaderParams($response->getHeaders());
195 195
 
196 196
 
197
-        if (! isset($params['x-upyun-list-iter'])) {
197
+        if (!isset($params['x-upyun-list-iter'])) {
198 198
             if (is_resource($saveHandler)) {
199 199
                 Psr7\Utils::copyToStream($response->getBody(), Psr7\stream_for($saveHandler));
200 200
                 return true;
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function createDir($path)
300 300
     {
301
-        $path = rtrim($path, '/') . '/';
301
+        $path = rtrim($path, '/').'/';
302 302
         $req = new Rest($this->config);
303 303
         $res = $req->request('POST', $path)
304 304
             ->withHeader('folder', 'true')
@@ -328,9 +328,9 @@  discard block
 block discarded – undo
328 328
      */
329 329
     public function usage($path = '/')
330 330
     {
331
-        $path = rtrim($path, '/') . '/';
331
+        $path = rtrim($path, '/').'/';
332 332
         $req = new Rest($this->config);
333
-        $response = $req->request('GET', $path . '?usage')
333
+        $response = $req->request('GET', $path.'?usage')
334 334
             ->send();
335 335
 
336 336
         return $response->getBody()->getContents();
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function copy($source, $target)
348 348
     {
349
-        $source = '/' . $this->config->serviceName . '/' . ltrim($source, '/');
349
+        $source = '/'.$this->config->serviceName.'/'.ltrim($source, '/');
350 350
         $req = new Rest($this->config);
351 351
         $response = $req->request('PUT', $target)
352 352
             ->withHeader('X-Upyun-Copy-Source', $source)
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function move($source, $target)
366 366
     {
367
-        $source = '/' . $this->config->serviceName . '/' . ltrim($source, '/');
367
+        $source = '/'.$this->config->serviceName.'/'.ltrim($source, '/');
368 368
         $req = new Rest($this->config);
369 369
         $response = $req->request('PUT', $target)
370 370
             ->withHeader('X-Upyun-Move-Source', $source)
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             'headers' =>  Signature::getPurgeSignHeader($this->config, $urlString),
394 394
             'form_params' => ['purge' => $urlString]
395 395
         ]);
396
-        $result = json_decode((string)$response->getBody(), true);
396
+        $result = json_decode((string) $response->getBody(), true);
397 397
         return $result['invalid_domain_of_url'];
398 398
     }
399 399
 
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
         $video = new Api\Pretreat($this->config);
442 442
 
443 443
         $options = array();
444
-        switch($type) {
444
+        switch ($type) {
445 445
             case self::$PROCESS_TYPE_MEDIA:
446 446
                 $options['accept'] = 'json';
447 447
                 $options['source'] = $source;
Please login to merge, or discard this patch.