@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | protected function setExceptionHandler(): Cli |
117 | 117 | { |
118 | - set_exception_handler(function ($e) { |
|
118 | + set_exception_handler(function($e) { |
|
119 | 119 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
120 | 120 | 'category' => get_class($this), |
121 | 121 | 'exception' => $e |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @param bool $single |
59 | 59 | * @return Response |
60 | 60 | */ |
61 | - public function getAclRoles(string $q, bool $single=false): Response |
|
61 | + public function getAclRoles(string $q, bool $single = false): Response |
|
62 | 62 | { |
63 | 63 | $resource = new UserResource($this->user, $this->logger, $this->fs); |
64 | 64 | $result = $resource->searchRole($q, $single); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $name = $this->camelCase2Dashes($method->name); |
158 | 158 | $parts = explode('-', $name); |
159 | 159 | $verb = strtoupper($parts[0]); |
160 | - $func = substr($name, strlen($verb)+1); |
|
160 | + $func = substr($name, strlen($verb) + 1); |
|
161 | 161 | $url = '/rest/'.strtolower($controller).'/'.$func; |
162 | 162 | $doc = $this->parsePhpDoc($method->getDocComment()); |
163 | 163 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param string $uid |
39 | 39 | * @return Response |
40 | 40 | */ |
41 | - public function head(?string $uid=null, ?string $uname=null): Response |
|
41 | + public function head(? string $uid = null, ? string $uname = null) : Response |
|
42 | 42 | { |
43 | 43 | $result = $this->_getUser($uid, $uname); |
44 | 44 | return (new Response())->setCode(204); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param int $soft |
72 | 72 | * @return Response |
73 | 73 | */ |
74 | - public function postQuota(int $hard, int $soft, ?string $uid=null, ?string $uname=null): Response |
|
74 | + public function postQuota(int $hard, int $soft, ? string $uid = null, ? string $uname = null) : Response |
|
75 | 75 | { |
76 | 76 | $result = $this->_getUser($uid, $uname) |
77 | 77 | ->setHardQuota($hard) |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param bool $force |
116 | 116 | * @return Response |
117 | 117 | */ |
118 | - public function delete(?string $uid=null, ?string $uname=null, bool $force=false): Response |
|
118 | + public function delete(? string $uid = null, ? string $uname = null, bool $force = false) : Response |
|
119 | 119 | { |
120 | 120 | $user = $this->_getUser($uid, $uname); |
121 | 121 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * @param string $uid |
151 | 151 | * @return Response |
152 | 152 | */ |
153 | - public function postUndelete(?string $uid=null, ?string $uname=null): Response |
|
153 | + public function postUndelete(? string $uid = null, ? string $uname = null) : Response |
|
154 | 154 | { |
155 | 155 | $this->_getUser($uid, $uname)->undelete(); |
156 | 156 | return (new Response())->setCode(204); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -231,7 +231,6 @@ |
||
231 | 231 | * |
232 | 232 | * @apiSuccessExample {json} Success-Response: |
233 | 233 | * HTTP/1.1 204 No Content |
234 | - |
|
235 | 234 | * @param string $id |
236 | 235 | * @param string $p |
237 | 236 | * @return Response |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * @param string $p |
42 | 42 | * @return Response |
43 | 43 | */ |
44 | - public function headChildren(?string $id=null, ?string $p=null): Response |
|
44 | + public function headChildren(? string $id = null, ? string $p = null) : Response |
|
45 | 45 | { |
46 | 46 | $result = $this->fs->getNode($id, $p, null, false, true); |
47 | 47 | $children = $result->getSize(); |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | * @return Response |
98 | 98 | */ |
99 | 99 | public function getChildren( |
100 | - ?string $id=null, |
|
101 | - ?string $p=null, |
|
102 | - int $deleted=0, |
|
103 | - array $filter=[], |
|
104 | - array $attributes=[]): Response |
|
100 | + ? string $id = null, |
|
101 | + ? string $p = null, |
|
102 | + int $deleted = 0, |
|
103 | + array $filter = [], |
|
104 | + array $attributes = []) : Response |
|
105 | 105 | { |
106 | 106 | $children = []; |
107 | 107 | $nodes = $this->fs->getNode($id, $p, null, false, true)->getChildNodes($deleted, $filter); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * @param string $p |
153 | 153 | * @return Response |
154 | 154 | */ |
155 | - public function getShare(?string $id=null, ?string $p=null): Response |
|
155 | + public function getShare(? string $id = null, ? string $p = null) : Response |
|
156 | 156 | { |
157 | 157 | $result = $this->fs->getNode($id, $p)->getShare(); |
158 | 158 | return (new Response())->setCode(200)->setBody($result); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * @param array $acl |
201 | 201 | * @return Response |
202 | 202 | */ |
203 | - public function postShare(array $acl, ?string $id=null, ?string $p=null): Response |
|
203 | + public function postShare(array $acl, ? string $id = null, ? string $p = null) : Response |
|
204 | 204 | { |
205 | 205 | $node = $this->fs->getNode($id, $p); |
206 | 206 | $result = $node->share($acl); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | * @param string $p |
237 | 237 | * @return Response |
238 | 238 | */ |
239 | - public function deleteShare(?string $id=null, ?string $p=null): Response |
|
239 | + public function deleteShare(? string $id = null, ? string $p = null) : Response |
|
240 | 240 | { |
241 | 241 | $node = $this->fs->getNode($id, $p); |
242 | 242 | $result = $node->unshare(); |
@@ -291,11 +291,11 @@ discard block |
||
291 | 291 | * @return Response |
292 | 292 | */ |
293 | 293 | public function post( |
294 | - ?string $id=null, |
|
295 | - ?string $p=null, |
|
296 | - ?string $name=null, |
|
297 | - array $attributes=[], |
|
298 | - int $conflict=0): Response |
|
294 | + ? string $id = null, |
|
295 | + ? string $p = null, |
|
296 | + ? string $name = null, |
|
297 | + array $attributes = [], |
|
298 | + int $conflict = 0) : Response |
|
299 | 299 | { |
300 | 300 | if ($p !== null && $name !== null) { |
301 | 301 | throw new Exception\InvalidArgument('p and name can not be used at the same time'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param string $config |
43 | 43 | * @return void |
44 | 44 | */ |
45 | - public function __construct($config=[]) |
|
45 | + public function __construct($config = []) |
|
46 | 46 | { |
47 | 47 | if ($config instanceof ConfigInterface) { |
48 | 48 | $this->store = $config->map(); |