Completed
Branch dev (09647c)
by Raffael
11:14
created
src/app/Balloon.App.Office/Session/Member.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
             'BaseFileName' => $attrs['name'],
141 141
             'Size' => $doc->getSize(),
142 142
             'Version' => $attrs['version'],
143
-            'OwnerId' => (string) $doc->getNode()->getOwner(),
144
-            'UserId' => (string) $this->user->getId(),
143
+            'OwnerId' => (string)$doc->getNode()->getOwner(),
144
+            'UserId' => (string)$this->user->getId(),
145 145
             'UserFriendlyName' => $this->user->getUsername(),
146 146
             'UserCanWrite' => true,
147 147
             'PostMessageOrigin' => null,
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Api/Latest/Session.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 ->store();
101 101
 
102 102
         return (new Response())->setCode(201)->setBody([
103
-            'id' => (string) $session->getId(),
103
+            'id' => (string)$session->getId(),
104 104
             'wopi_url' => $this->app->getWopiUrl(),
105 105
             'access_token' => $member->getAccessToken(),
106 106
             'access_token_ttl' => ($member->getTTL()->toDateTime()->format('U') * 1000),
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Api/Latest/Document.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
 
95 95
         foreach ($document->getSessions() as $session) {
96 96
             $sessions[] = [
97
-                'id' => (string) $session['_id'],
97
+                'id' => (string)$session['_id'],
98 98
                 'created' => $session['_id']->getTimestamp(),
99 99
                 'user' => [
100
-                    'id' => (string) $session['user'],
100
+                    'id' => (string)$session['user'],
101 101
                     'name' => $this->server->getUserById($session['user'])->getUsername(),
102 102
                 ],
103 103
             ];
@@ -165,6 +165,6 @@  discard block
 block discarded – undo
165 165
         $tpl = new Template($type);
166 166
         $result = $parent->addFile($name, $tpl->get(), $attributes);
167 167
 
168
-        return (new Response())->setCode(201)->setBody((string) $result->getId());
168
+        return (new Response())->setCode(201)->setBody((string)$result->getId());
169 169
     }
170 170
 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Job.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 
72 72
         $slaves = $file->getAppAttribute(__NAMESPACE__, 'slaves');
73 73
 
74
-        if (is_array($slaves) && isset($slaves[(string) $this->data['slave']])) {
75
-            $slave = $slaves[(string) $this->data['slave']];
74
+        if (is_array($slaves) && isset($slaves[(string)$this->data['slave']])) {
75
+            $slave = $slaves[(string)$this->data['slave']];
76 76
         } else {
77 77
             throw new Exception('unknown slave node');
78 78
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $node->setReadonly();
122 122
 
123
-        $slaves[(string) $this->data['slave']]['node'] = $node->getId();
123
+        $slaves[(string)$this->data['slave']]['node'] = $node->getId();
124 124
         $file->setAppAttribute(__NAMESPACE__, 'slaves', $slaves);
125 125
 
126 126
         return true;
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Api/Latest/Convert.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $file = $this->fs->getNode($id, $p, File::class);
121 121
         $slaves = $file->getAppAttribute('Balloon\\App\\Convert', 'slaves');
122 122
 
123
-        return (new Response())->setCode(200)->setBody((array) $slaves);
123
+        return (new Response())->setCode(200)->setBody((array)$slaves);
124 124
     }
125 125
 
126 126
     /**
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
             'slave' => $id,
168 168
         ]);
169 169
 
170
-        $slaves[(string) $id] = [
170
+        $slaves[(string)$id] = [
171 171
             '_id' => $id,
172 172
             'format' => $format,
173 173
         ];
174 174
 
175 175
         $file->setAppAttribute('Balloon\\App\\Convert', 'slaves', $slaves);
176 176
 
177
-        return (new Response())->setCode(201)->setBody((string) $id);
177
+        return (new Response())->setCode(201)->setBody((string)$id);
178 178
     }
179 179
 
180 180
     /**
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/Elasticsearch.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         foreach ($config as $option => $value) {
94 94
             switch ($option) {
95 95
                 case 'server':
96
-                    $this->es_server = (array) $value;
96
+                    $this->es_server = (array)$value;
97 97
 
98 98
                 break;
99 99
                 case 'index':
100
-                    $this->es_index = (string) $value;
100
+                    $this->es_index = (string)$value;
101 101
 
102 102
                 break;
103 103
                 default:
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             ],
148 148
         ]);
149 149
 
150
-        $user = (string) $this->user->getId();
150
+        $user = (string)$this->user->getId();
151 151
         foreach ($result['hits']['hits'] as $node) {
152 152
             $id = false;
153 153
 
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
                     $_node = $this->fs->findNodeById($id);
159 159
                     if ($_node->isDeleted() && (1 === $deleted || 2 === $deleted)
160 160
                      || !$_node->isDeleted() && (0 === $deleted || 2 === $deleted)) {
161
-                        if (!($_node->isShared() && !$_node->isOwnerRequest()) && !isset($list[(string) $_node->getId()])) {
162
-                            $list[(string) $_node->getId()] = $_node;
161
+                        if (!($_node->isShared() && !$_node->isOwnerRequest()) && !isset($list[(string)$_node->getId()])) {
162
+                            $list[(string)$_node->getId()] = $_node;
163 163
                         }
164 164
                     }
165 165
                 } catch (\Exception $e) {
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
         $bool = $query['body']['query'];
240 240
 
241 241
         $filter1 = [];
242
-        $filter1['bool']['should'][]['term']['owner'] = (string) $this->user->getId();
243
-        $filter1['bool']['should'][]['term']['metadata.ref.owner'] = (string) $this->user->getId();
242
+        $filter1['bool']['should'][]['term']['owner'] = (string)$this->user->getId();
243
+        $filter1['bool']['should'][]['term']['metadata.ref.owner'] = (string)$this->user->getId();
244 244
 
245 245
         $share_filter = [
246 246
             'bool' => [
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/Migration/Delta/Installation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         foreach ($config as $key => $value) {
69 69
             switch ($key) {
70 70
                 case 'index_configuration':
71
-                    $this->{$key} = (string) $value;
71
+                    $this->{$key} = (string)$value;
72 72
 
73 73
                 break;
74 74
                 default:
Please login to merge, or discard this patch.
src/app/Balloon.App.Sharelink/Sharelink.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             if (empty($set['expiration'])) {
69 69
                 unset($set['expiration']);
70 70
             } else {
71
-                $set['expiration'] = (int) $set['expiration'];
71
+                $set['expiration'] = (int)$set['expiration'];
72 72
             }
73 73
         }
74 74
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         }
161 161
 
162 162
         if (isset($attributes['expiration']) && !empty($attributes['expiration'])) {
163
-            $time = (int) $attributes['expiration'];
163
+            $time = (int)$attributes['expiration'];
164 164
             if ($time < time()) {
165 165
                 throw new Exception('share link for this node is expired');
166 166
             }
Please login to merge, or discard this patch.