Completed
Branch master (1995c1)
by Raffael
08:57
created
src/lib/Balloon/Http/Router.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                     }
224 224
                 } else {
225 225
                     $this->logger->debug('requested path ['.$this->path.'] does not match route ['.$route->getPath().']', [
226
-                         'category' => get_class($this),
226
+                            'category' => get_class($this),
227 227
                     ]);
228 228
                 }
229 229
             }
@@ -267,22 +267,22 @@  discard block
 block discarded – undo
267 267
         ];
268 268
 
269 269
         switch (get_class($exception)) {
270
-           case 'Balloon\\Exception\\InvalidArgument':
270
+            case 'Balloon\\Exception\\InvalidArgument':
271 271
            case 'Balloon\\Exception\\Conflict':
272 272
                $code = 400;
273
-           break;
274
-           case 'Balloon\\Exception\\NotFound':
273
+            break;
274
+            case 'Balloon\\Exception\\NotFound':
275 275
                $code = 404;
276
-           break;
277
-           case 'Balloon\\Exception\\Forbidden':
276
+            break;
277
+            case 'Balloon\\Exception\\Forbidden':
278 278
                $code = 403;
279
-           break;
280
-           case 'Balloon\\Exception\\InsufficientStorage':
279
+            break;
280
+            case 'Balloon\\Exception\\InsufficientStorage':
281 281
                $code = 507;
282
-           break;
283
-           default:
282
+            break;
283
+            default:
284 284
               $code = 500;
285
-           break;
285
+            break;
286 286
         }
287 287
         
288 288
         $this->logger->error('uncaught exception '.$message.']', [
Please login to merge, or discard this patch.
src/lib/Balloon/Http/Response.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -282,13 +282,13 @@
 block discarded – undo
282 282
 
283 283
 
284 284
     /**
285
-    * Converts mixed data to XML
286
-    *
287
-    * @param    mixed $data
288
-    * @param    SimpleXMLElement $xml
289
-    * @param    string|int $child_name
290
-    * @return   string
291
-    */
285
+     * Converts mixed data to XML
286
+     *
287
+     * @param    mixed $data
288
+     * @param    SimpleXMLElement $xml
289
+     * @param    string|int $child_name
290
+     * @return   string
291
+     */
292 292
     public function toXML($data, SimpleXMLElement $xml, $child_name): string
293 293
     {
294 294
         if (is_object($data)) {
Please login to merge, or discard this patch.
src/lib/Balloon/Filesystem.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -204,14 +204,14 @@  discard block
 block discarded – undo
204 204
      *
205 205
      * @return Delta
206 206
      */
207
-     public function getDelta(): Delta
208
-     {
209
-         if ($this->delta instanceof Delta) {
210
-             return $this->delta;
211
-         }
207
+        public function getDelta(): Delta
208
+        {
209
+            if ($this->delta instanceof Delta) {
210
+                return $this->delta;
211
+            }
212 212
  
213
-         return $this->delta = new Delta($this);
214
-     }
213
+            return $this->delta = new Delta($this);
214
+        }
215 215
 
216 216
     
217 217
     /**
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
     protected function _searchElastic(array $query, array $shares): array
580 580
     {
581 581
         $client = \Elasticsearch\ClientBuilder::create()
582
-                   ->setHosts((array)$this->config->search->hosts->server)
583
-                   ->build();
582
+                    ->setHosts((array)$this->config->search->hosts->server)
583
+                    ->build();
584 584
 
585 585
         $bool =  $query['body']['query'];
586 586
 
Please login to merge, or discard this patch.
src/lib/Balloon/Auth.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         }
123 123
         
124 124
         $this->logger->warning("all authentication adapter have failed", [
125
-           'category' => get_class($this)
125
+            'category' => get_class($this)
126 126
         ]);
127 127
 
128 128
         $this->plugin->run('invalidAuthentication', [$adapters]);
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
                 switch ($value['type']) {
252 252
                     case 'array':
253 253
                          $arr =  (array)$data[$value['attr']];
254
-                          unset($arr['count']);
255
-                          $attrs[$attr] = $arr;
254
+                            unset($arr['count']);
255
+                            $attrs[$attr] = $arr;
256 256
                     break;
257 257
                         
258 258
                     case 'string':
Please login to merge, or discard this patch.
src/lib/Balloon/Auth/Adapter/Oauth2.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     protected $resource;
43 43
     
44 44
 
45
-   /**
45
+    /**
46 46
      * Logger
47 47
      *
48 48
      * @var Logger
Please login to merge, or discard this patch.
src/lib/Balloon/Filesystem/Node/Node.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -893,7 +893,7 @@
 block discarded – undo
893 893
                 case 'shareowner':
894 894
                     if ($this->isSpecial() && $sharenode !== null) {
895 895
                         $build['shareowner'] = (new User($this->_fs->findRawNode($this->getShareId())['owner'],
896
-                          $this->_logger, $this->_fs)
896
+                            $this->_logger, $this->_fs)
897 897
                         )->getUsername();
898 898
                     }
899 899
                 break;
Please login to merge, or discard this patch.
src/lib/Balloon/Filesystem/Node/File.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $v = (array)$version;
206 206
 
207 207
             $v['user'] = (new User($version['user'], $this->_logger, $this->_fs))
208
-              ->getUsername();
208
+                ->getUsername();
209 209
             $v['changed'] = Helper::DateTimeToUnix($version['changed']);
210 210
             $filtered[] = $v;
211 211
         }
@@ -597,15 +597,15 @@  discard block
 block discarded – undo
597 597
         $build = [];
598 598
         foreach ($requested as $key => $attr) {
599 599
             switch ($attr) {
600
-               case 'hash':
600
+                case 'hash':
601 601
                case 'version':
602 602
                case 'thumbnail':
603 603
                    $build[$attr] = $this->{$attr};
604
-               break;
604
+                break;
605 605
             
606
-               case 'history':
606
+                case 'history':
607 607
                    $build['history'] = $this->getHistory();
608
-               break;
608
+                break;
609 609
             }
610 610
         }
611 611
 
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
             //somehow mongo-connector does not catch metadata when set during uploadFromStream()
871 871
             $stream = $bucket->uploadFromStream($id, $contents, ['_id' => $id/*, 'metadata' => $file*/]);
872 872
             $this->_db->{'fs.files'}->updateOne(['_id' => $id], [
873
-              '$set' => ['metadata'=> $file]
873
+                '$set' => ['metadata'=> $file]
874 874
             ]);
875 875
             
876 876
             $this->_logger->info('added new gridfs content node ['.$id.'] for file ['.$this->_id.']', [
Please login to merge, or discard this patch.
src/lib/Balloon/Bootstrap/Http.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
             if (isset($app['enabled']) && $app['enabled'] != "1") {
100 100
                 $this->logger->debug('skip disabled app ['.$class.']', [
101
-                   'category' => get_class($this)
101
+                    'category' => get_class($this)
102 102
                 ]);
103 103
                 continue;
104 104
             }
Please login to merge, or discard this patch.
src/lib/Balloon/Rest/v1/Node.php 1 patch
Indentation   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -209,7 +209,6 @@  discard block
 block discarded – undo
209 209
      * curl -XHEAD "https://SERVER/api/v1/node?id=544627ed3c58891f058b4686"
210 210
      * curl -XHEAD "https://SERVER/api/v1/node/544627ed3c58891f058b4686"
211 211
      * curl -XHEAD "https://SERVER/api/v1/node?p=/absolute/path/to/my/node"
212
-
213 212
      * @apiParam (GET Parameter) {number} [deleted=0] Wherever include deleted node or not, possible values:</br>
214 213
      * - 0 Exclude deleted</br>
215 214
      * - 1 Only deleted</br>
@@ -666,9 +665,9 @@  discard block
 block discarded – undo
666 665
                 $node->zip($archive);
667 666
             } catch (\Exception $e) {
668 667
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
669
-                   'category' => get_class($this),
670
-                   'exception' => $e,
671
-               ]);
668
+                    'category' => get_class($this),
669
+                    'exception' => $e,
670
+                ]);
672 671
             }
673 672
         }
674 673
 
@@ -900,8 +899,8 @@  discard block
 block discarded – undo
900 899
     {
901 900
         $result = Helper::escape(
902 901
             $this->_getNode($id, $p)
903
-                 ->getParent()
904
-                 ->getAttribute($attributes)
902
+                    ->getParent()
903
+                    ->getAttribute($attributes)
905 904
         );
906 905
         
907 906
         return (new Response())->setCode(200)->setBody($result);
@@ -1641,7 +1640,6 @@  discard block
 block discarded – undo
1641 1640
      * - moveCollection
1642 1641
      * - moveCollectionReference
1643 1642
      * - moveCollectionShare
1644
-
1645 1643
      * @apiExample (cURL) example:
1646 1644
      * curl -XGET "https://SERVER/api/v1/node/event-log?pretty"
1647 1645
      * curl -XGET "https://SERVER/api/v1/node/event-log?id=544627ed3c58891f058b4686&pretty"
Please login to merge, or discard this patch.