Completed
Branch dev (d5d70c)
by Raffael
11:00
created
src/app/Balloon.App.Api/v1/AttributeDecorator/EventDecorator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      * @param string  $attribute
101 101
      * @param Closure $decorator
102 102
      *
103
-     * @return AttributeDecorator
103
+     * @return EventDecorator
104 104
      */
105 105
     public function addDecorator(string $attribute, Closure $decorator): self
106 106
     {
Please login to merge, or discard this 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
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     protected function getAttributes(array $event): array
141 141
     {
142 142
         return [
143
-            'event' => (string) $event['_id'],
143
+            'event' => (string)$event['_id'],
144 144
             'timestamp' => $this->dateTimeToUnix($event['timestamp']),
145 145
             'operation' => $event['operation'],
146 146
             'name' => $event['name'],
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/AttributeDecorator/NodeDecorator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      * @param string  $attribute
97 97
      * @param Closure $decorator
98 98
      *
99
-     * @return AttributeDecorator
99
+     * @return NodeDecorator
100 100
      */
101 101
     public function addDecorator(string $attribute, Closure $decorator): self
102 102
     {
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 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
@@ -136,37 +136,37 @@  discard block
 block discarded – undo
136 136
         $fs = $this->server->getFilesystem();
137 137
 
138 138
         return [
139
-            'id' => (string) $attributes['_id'],
140
-            'name' => (string) $attributes['name'],
141
-            'mime' => (string) $attributes['mime'],
142
-            'readonly' => (bool) $attributes['readonly'],
139
+            'id' => (string)$attributes['_id'],
140
+            'name' => (string)$attributes['name'],
141
+            'mime' => (string)$attributes['mime'],
142
+            'readonly' => (bool)$attributes['readonly'],
143 143
             'directory' => $node instanceof Collection,
144
-            'meta' => function ($node) {
145
-                return (object) $node->getMetaAttributes();
144
+            'meta' => function($node) {
145
+                return (object)$node->getMetaAttributes();
146 146
             },
147
-            'size' => function ($node) {
147
+            'size' => function($node) {
148 148
                 return $node->getSize();
149 149
             },
150
-            'path' => function ($node) {
150
+            'path' => function($node) {
151 151
                 try {
152 152
                     return $node->getPath();
153 153
                 } catch (\Exception $e) {
154 154
                     return null;
155 155
                 }
156 156
             },
157
-            'parent' => function ($node) {
157
+            'parent' => function($node) {
158 158
                 $id = $node->getAttributes()['parent'];
159 159
 
160 160
                 if (null === $id) {
161 161
                     return null;
162 162
                 }
163 163
 
164
-                return (string) $id;
164
+                return (string)$id;
165 165
             },
166
-            'access' => function ($node) use ($acl) {
166
+            'access' => function($node) use ($acl) {
167 167
                 return $acl->getAclPrivilege($node);
168 168
             },
169
-            'share' => function ($node) {
169
+            'share' => function($node) {
170 170
                 if ($node->isShared() || !$node->isSpecial()) {
171 171
                     return null;
172 172
                 }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                     return null;
178 178
                 }
179 179
             },
180
-            'shareowner' => function ($node) use ($server, $fs) {
180
+            'shareowner' => function($node) use ($server, $fs) {
181 181
                 if (!$node->isSpecial()) {
182 182
                     return null;
183 183
                 }
@@ -223,20 +223,20 @@  discard block
 block discarded – undo
223 223
     protected function getTimeAttributes(NodeInterface $node, array $attributes): array
224 224
     {
225 225
         return [
226
-            'created' => function ($node) use ($attributes) {
226
+            'created' => function($node) use ($attributes) {
227 227
                 return $this->dateTimeToUnix($attributes['created']);
228 228
             },
229
-            'changed' => function ($node) use ($attributes) {
229
+            'changed' => function($node) use ($attributes) {
230 230
                 return $this->dateTimeToUnix($attributes['changed']);
231 231
             },
232
-            'deleted' => function ($node) use ($attributes) {
232
+            'deleted' => function($node) use ($attributes) {
233 233
                 if (false === $attributes['deleted']) {
234 234
                     return false;
235 235
                 }
236 236
 
237 237
                 return $this->dateTimeToUnix($attributes['destroy']);
238 238
             },
239
-            'destroy' => function ($node) use ($attributes) {
239
+            'destroy' => function($node) use ($attributes) {
240 240
                 if (null === $attributes['destroy']) {
241 241
                     return false;
242 242
                 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/AttributeDecorator/RoleDecorator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      * @param string  $attribute
81 81
      * @param Closure $decorator
82 82
      *
83
-     * @return AttributeDecorator
83
+     * @return RoleDecorator
84 84
      */
85 85
     public function addDecorator(string $attribute, Closure $decorator): self
86 86
     {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         return [
108
-            'created' => function ($role, $requested) use ($attributes) {
108
+            'created' => function($role, $requested) use ($attributes) {
109 109
                 return $attributes['created']->toDateTime()->format('c');
110 110
             },
111
-            'changed' => function ($role, $requested) use ($attributes) {
111
+            'changed' => function($role, $requested) use ($attributes) {
112 112
                 return $attributes['changed']->toDateTime()->format('c');
113 113
             },
114
-            'deleted' => function ($role, $requested) use ($attributes) {
114
+            'deleted' => function($role, $requested) use ($attributes) {
115 115
                 if (false === $attributes['deleted']) {
116 116
                     return null;
117 117
                 }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
 
138 138
         return [
139
-            'id' => (string) $attributes['_id'],
139
+            'id' => (string)$attributes['_id'],
140 140
             'name' => $attributes['name'],
141 141
             'namespace' => $attributes['namespace'],
142 142
         ];
@@ -159,18 +159,18 @@  discard block
 block discarded – undo
159 159
         $user = $this->server->getIdentity();
160 160
 
161 161
         return [
162
-            'id' => (string) $attributes['_id'],
163
-            'name' => (string) $attributes['username'],
164
-            'namespace' => (string) $attributes['namespace'],
165
-            'mail' => (string) $attributes['mail'],
166
-            'avatar' => function ($role, $requested) use ($attributes) {
162
+            'id' => (string)$attributes['_id'],
163
+            'name' => (string)$attributes['username'],
164
+            'namespace' => (string)$attributes['namespace'],
165
+            'mail' => (string)$attributes['mail'],
166
+            'avatar' => function($role, $requested) use ($attributes) {
167 167
                 if ($attributes['avatar'] instanceof Binary) {
168 168
                     return base64_encode($attributes['avatar']->getData());
169 169
                 }
170 170
 
171 171
                 return null;
172 172
             },
173
-            'soft_quota' => function ($role, $requested) use ($attributes, $user) {
173
+            'soft_quota' => function($role, $requested) use ($attributes, $user) {
174 174
                 if ($user === null) {
175 175
                     return null;
176 176
                 }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
                 return null;
183 183
             },
184
-            'hard_quota' => function ($role, $requested) use ($attributes, $user) {
184
+            'hard_quota' => function($role, $requested) use ($attributes, $user) {
185 185
                 if ($user === null) {
186 186
                     return null;
187 187
                 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/User.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -357,8 +357,6 @@
 block discarded – undo
357 357
      *     "data": "user"
358 358
      * }
359 359
      *
360
-     * @param string $uid
361
-     * @param string $uname
362 360
      *
363 361
      * @return Response
364 362
      */
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Users.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -159,8 +159,6 @@
 block discarded – undo
159 159
      *     "name": "peter.meier"
160 160
      * }
161 161
      *
162
-     * @param string $id
163
-     * @param string $uname
164 162
      *
165 163
      * @return Response
166 164
      */
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Api/v2/Convert.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -173,8 +173,6 @@
 block discarded – undo
173 173
      * HTTP/1.1 204 No Content
174 174
      *
175 175
      * @param string $id
176
-     * @param string $p
177
-     * @param string $slave
178 176
      * @param bool   $node
179 177
      */
180 178
     public function deleteSlaves(ObjectId $id, bool $node = false): Response
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 
107 107
         foreach ($this->converter->getSlaves($file) as $slave) {
108 108
             $element = [
109
-                'id' => (string) $slave['_id'],
110
-                'master' => (string) $slave['master'],
109
+                'id' => (string)$slave['_id'],
110
+                'master' => (string)$slave['master'],
111 111
                 'format' => $slave['format'],
112 112
             ];
113 113
 
114 114
             if (isset($slave['slave'])) {
115
-                $element['slave'] = (string) $slave['slave'];
115
+                $element['slave'] = (string)$slave['slave'];
116 116
             }
117 117
 
118 118
             $body[] = $element;
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
         $id = $this->converter->addSlave($file, $format);
152 152
 
153 153
         return (new Response())->setCode(200)->setBody([
154
-            'id' => (string) $id,
155
-            'master' => (string) $file->getId(),
154
+            'id' => (string)$id,
155
+            'master' => (string)$file->getId(),
156 156
             'format' => $format,
157 157
         ]);
158 158
     }
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Converter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      *
115 115
      * @param ObjectId $id
116 116
      *
117
-     * @return array
117
+     * @return File
118 118
      */
119 119
     public function getSlave(ObjectId $id): array
120 120
     {
Please login to merge, or discard this patch.
src/app/Balloon.App.Convert/Job.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,6 @@
 block discarded – undo
53 53
     /**
54 54
      * Start job.
55 55
      *
56
-     * @param Server          $server
57
-     * @param LoggerInterface $logger
58 56
      *
59 57
      * @return bool
60 58
      */
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Api/v2/Documents.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 use Balloon\Filesystem\Node\Collection;
21 21
 use Balloon\Filesystem\Node\File;
22 22
 use Balloon\Server;
23
-use Balloon\Server\User;
24 23
 use Micro\Http\Response;
25 24
 
26 25
 class Documents extends Controller
Please login to merge, or discard this 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
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
 
102 102
         foreach ($document->getSessions() as $session) {
103 103
             $sessions[] = [
104
-                'id' => (string) $session['_id'],
104
+                'id' => (string)$session['_id'],
105 105
                 'created' => $session['_id']->getTimestamp(),
106 106
                 'user' => [
107
-                    'id' => (string) $session['user'],
107
+                    'id' => (string)$session['user'],
108 108
                     'name' => $this->server->getUserById($session['user'])->getUsername(),
109 109
                 ],
110 110
             ];
Please login to merge, or discard this patch.