@@ -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 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @param string $encode |
56 | 56 | * @return void |
57 | 57 | */ |
58 | - public function getPreview(?string $id=null, ?string $p=null, ?string $encode=null): void |
|
58 | + public function getPreview(? string $id = null, ? string $p = null, ? string $encode = null) : void |
|
59 | 59 | { |
60 | 60 | $node = $this->_getNode($id, $p); |
61 | 61 | $data = $node->getPreview(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param string $p |
129 | 129 | * @return Response |
130 | 130 | */ |
131 | - public function getHistory(?string $id=null, ?string $p=null): Response |
|
131 | + public function getHistory(? string $id = null, ? string $p = null) : Response |
|
132 | 132 | { |
133 | 133 | $result = Helper::escape( |
134 | 134 | $this->_getNode($id, $p)->getHistory() |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @param string $version |
162 | 162 | * @return Response |
163 | 163 | */ |
164 | - public function postRestore(int $version, ?string $id=null, ?string $p=null): Response |
|
164 | + public function postRestore(int $version, ? string $id = null, ? string $p = null) : Response |
|
165 | 165 | { |
166 | 166 | $result = $this->_getNode($id, $p)->restore($version); |
167 | 167 | return (new Response())->setCode(204); |
@@ -297,15 +297,15 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function putChunk( |
299 | 299 | string $chunkgroup, |
300 | - ?string $id=null, |
|
301 | - ?string $p=null, |
|
302 | - ?string $collection=null, |
|
303 | - ?string $name=null, |
|
304 | - int $index=1, |
|
305 | - int $chunks=0, |
|
306 | - int $size=0, |
|
307 | - array $attributes=[], |
|
308 | - int $conflict=0) |
|
300 | + ? string $id = null, |
|
301 | + ? string $p = null, |
|
302 | + ? string $collection = null, |
|
303 | + ? string $name = null, |
|
304 | + int $index = 1, |
|
305 | + int $chunks = 0, |
|
306 | + int $size = 0, |
|
307 | + array $attributes = [], |
|
308 | + int $conflict = 0) |
|
309 | 309 | { |
310 | 310 | ini_set('auto_detect_line_endings', '1'); |
311 | 311 | $input_handler = fopen('php://input', 'rb'); |
@@ -464,12 +464,12 @@ discard block |
||
464 | 464 | * @return Response |
465 | 465 | */ |
466 | 466 | public function put( |
467 | - ?string $id=null, |
|
468 | - ?string $p=null, |
|
469 | - ?string $collection=null, |
|
470 | - ?string $name=null, |
|
471 | - array $attributes=[], |
|
472 | - int $conflict=0): Response |
|
467 | + ? string $id = null, |
|
468 | + ? string $p = null, |
|
469 | + ? string $collection = null, |
|
470 | + ? string $name = null, |
|
471 | + array $attributes = [], |
|
472 | + int $conflict = 0) : Response |
|
473 | 473 | { |
474 | 474 | $attributes = $this->_verifyAttributes($attributes); |
475 | 475 | |
@@ -493,12 +493,12 @@ discard block |
||
493 | 493 | */ |
494 | 494 | protected function _put( |
495 | 495 | $content, |
496 | - ?string $id=null, |
|
497 | - ?string $p=null, |
|
498 | - ?string $collection=null, |
|
499 | - ?string $name=null, |
|
500 | - array $attributes=[], |
|
501 | - int $conflict=0): Response |
|
496 | + ? string $id = null, |
|
497 | + ? string $p = null, |
|
498 | + ? string $collection = null, |
|
499 | + ? string $name = null, |
|
500 | + array $attributes = [], |
|
501 | + int $conflict = 0) : Response |
|
502 | 502 | { |
503 | 503 | if ($id === null && $p === null && $name === null) { |
504 | 504 | throw new Exception\InvalidArgument('neither id, p nor name was set'); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $result = $node->put($content, false, $attributes); |
519 | 519 | return (new Response())->setCode(200)->setBody($result); |
520 | 520 | } elseif ($p === null && $id === null && $name !== null) { |
521 | - $collection = $this->_getNode($collection, null, 'Collection', false, true); |
|
521 | + $collection = $this->_getNode($collection, null, 'Collection', false, true); |
|
522 | 522 | |
523 | 523 | if ($collection->childExists($name)) { |
524 | 524 | $child = $collection->getChild($name); |
@@ -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 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param string $uname |
76 | 76 | * @return User |
77 | 77 | */ |
78 | - public function _getUser(?string $uid=null, ?string $uname=null) |
|
78 | + public function _getUser(? string $uid = null, ? string $uname = null) |
|
79 | 79 | { |
80 | 80 | if ($uid !== null || $uname !== null) { |
81 | 81 | if ($this->user->isAdmin()) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | * @param string $uname |
139 | 139 | * @return Response |
140 | 140 | */ |
141 | - public function getIsAdmin(?string $uid=null, ?string $uname=null): Response |
|
141 | + public function getIsAdmin(? string $uid = null, ? string $uname = null) : Response |
|
142 | 142 | { |
143 | 143 | $result = $this->_getUser($uid, $uname)->isAdmin(); |
144 | 144 | return (new Response())->setCode(200)->setBody($result); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @param string $uname |
175 | 175 | * @return Response |
176 | 176 | */ |
177 | - public function getWhoami(?string $uid=null, ?string $uname=null): Response |
|
177 | + public function getWhoami(? string $uid = null, ? string $uname = null) : Response |
|
178 | 178 | { |
179 | 179 | $result = $this->_getUser($uid, $uname)->getUsername(); |
180 | 180 | return (new Response())->setCode(200)->setBody($result); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @param int $limit |
213 | 213 | * @return Response |
214 | 214 | */ |
215 | - public function getNodeAttributeSummary(?string $uid=null, ?string $uname=null, array $attributes=[], int $limit=25): Response |
|
215 | + public function getNodeAttributeSummary(? string $uid = null, ? string $uname = null, array $attributes = [], int $limit = 25) : Response |
|
216 | 216 | { |
217 | 217 | $result = $this->_getUser($uid, $uname)->getNodeAttributeSummary($attributes, $limit); |
218 | 218 | return (new Response())->setCode(200)->setBody($result); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * @param string $uname |
252 | 252 | * @return void |
253 | 253 | */ |
254 | - public function getGroups(?string $uid=null, ?string $uname=null): Response |
|
254 | + public function getGroups(? string $uid = null, ? string $uname = null) : Response |
|
255 | 255 | { |
256 | 256 | $result = $this->_getUser($uid, $uname)->getGroups(); |
257 | 257 | return (new Response())->setCode(200)->setBody($result); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * @param string $uname |
291 | 291 | * @return Response |
292 | 292 | */ |
293 | - public function getShares(?string $uid=null, ?string $uname=null): Response |
|
293 | + public function getShares(? string $uid = null, ? string $uname = null) : Response |
|
294 | 294 | { |
295 | 295 | $result = $this->_getUser($uid, $uname)->getShares(); |
296 | 296 | return (new Response())->setCode(200)->setBody($result); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | * @param string $uname |
336 | 336 | * @return Response |
337 | 337 | */ |
338 | - public function getQuotaUsage(?string $uid=null, ?string $uname=null): Response |
|
338 | + public function getQuotaUsage(? string $uid = null, ? string $uname = null) : Response |
|
339 | 339 | { |
340 | 340 | $result = $this->_getUser($uid, $uname)->getQuotaUsage(); |
341 | 341 | return (new Response())->setCode(200)->setBody($result); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * @param string $attributes |
374 | 374 | * @return Response |
375 | 375 | */ |
376 | - public function getAttributes(?string $uid=null, ?string $uname=null, array $attributes=[]): Response |
|
376 | + public function getAttributes(? string $uid = null, ? string $uname = null, array $attributes = []) : Response |
|
377 | 377 | { |
378 | 378 | $result = $this->_getUser($uid, $uname)->getAttribute($attributes); |
379 | 379 | return (new Response())->setCode(200)->setBody($result); |
@@ -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 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param bool $ignore_namespace |
88 | 88 | * @return array |
89 | 89 | */ |
90 | - public function searchUser(string $q, bool $single=false, bool $ignore_namespace=false): array |
|
90 | + public function searchUser(string $q, bool $single = false, bool $ignore_namespace = false): array |
|
91 | 91 | { |
92 | 92 | if (empty($q)) { |
93 | 93 | return []; |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | } else { |
123 | 123 | $ns = $this->user->getAttribute('namespace'); |
124 | 124 | $filter = htmlspecialchars_decode(sprintf($searchu['filter'], $q)); |
125 | - $base = sprintf($config['basedn'], $ns); |
|
125 | + $base = sprintf($config['basedn'], $ns); |
|
126 | 126 | } |
127 | 127 | |
128 | - $result_user = ldap_search($ldap, $base, $filter, [ |
|
128 | + $result_user = ldap_search($ldap, $base, $filter, [ |
|
129 | 129 | $searchu['display_attr'], |
130 | 130 | $searchu['id_attr'], |
131 | 131 | ]); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * @param bool $single |
179 | 179 | * @return array |
180 | 180 | */ |
181 | - public function searchGroup(string $q, bool $single=false): array |
|
181 | + public function searchGroup(string $q, bool $single = false): array |
|
182 | 182 | { |
183 | 183 | if (empty($q)) { |
184 | 184 | return []; |
@@ -200,10 +200,10 @@ discard block |
||
200 | 200 | } else { |
201 | 201 | $ns = $this->user->getAttribute('namespace'); |
202 | 202 | $filter = htmlspecialchars_decode(sprintf($searchg['filter'], $q)); |
203 | - $base = sprintf($config['basedn'], $ns); |
|
203 | + $base = sprintf($config['basedn'], $ns); |
|
204 | 204 | } |
205 | 205 | |
206 | - $result_group = ldap_search($ldap, $base, $filter, [ |
|
206 | + $result_group = ldap_search($ldap, $base, $filter, [ |
|
207 | 207 | $searchg['display_attr'], |
208 | 208 | $searchg['id_attr'], |
209 | 209 | ]); |
@@ -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(); |
@@ -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 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param Iterable $config |
47 | 47 | * @return PluginInterface |
48 | 48 | */ |
49 | - public function setOptions(?Iterable $config): PluginInterface |
|
49 | + public function setOptions(? Iterable $config) : PluginInterface |
|
50 | 50 | { |
51 | 51 | if ($config === null) { |
52 | 52 | return $this; |
@@ -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 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param Iterable $config |
37 | 37 | * @return PluginInterface |
38 | 38 | */ |
39 | - public function setOptions(?Iterable $config): PluginInterface; |
|
39 | + public function setOptions(? Iterable $config) : PluginInterface; |
|
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @param array $params |
55 | 55 | * @return void |
56 | 56 | */ |
57 | - public function __call(string $method, array $params=[]): void; |
|
57 | + public function __call(string $method, array $params = []): void; |
|
58 | 58 | |
59 | 59 | |
60 | 60 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @param mixed $content |
111 | 111 | * @return void |
112 | 112 | */ |
113 | - public function preHttpResponse(\Balloon\Http\Response $response, int &$code, &$content): void; |
|
113 | + public function preHttpResponse(\Balloon\Http\Response $response, int&$code, &$content): void; |
|
114 | 114 | |
115 | 115 | |
116 | 116 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @param bool $clone |
190 | 190 | * @return void |
191 | 191 | */ |
192 | - public function preCreateCollection(Collection $parent, string &$name, array &$attributes, bool $clone): void; |
|
192 | + public function preCreateCollection(Collection $parent, string&$name, array &$attributes, bool $clone): void; |
|
193 | 193 | |
194 | 194 | |
195 | 195 | /** |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @param bool $clone |
217 | 217 | * @return void |
218 | 218 | */ |
219 | - public function preCreateFile(Collection $parent, string &$name, array &$attributes, bool $clone): void; |
|
219 | + public function preCreateFile(Collection $parent, string&$name, array &$attributes, bool $clone): void; |
|
220 | 220 | |
221 | 221 | |
222 | 222 | /** |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * @return void |
246 | 246 | */ |
247 | 247 | public function preCopyCollection(Collection $node, Collection $parent, |
248 | - int $conflict, ?string $recursion, bool $recursion_first): void; |
|
248 | + int $conflict, ? string $recursion, bool $recursion_first) : void; |
|
249 | 249 | |
250 | 250 | |
251 | 251 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * @return void |
263 | 263 | */ |
264 | 264 | public function postCopyCollection(Collection $node, Collection $parent, |
265 | - Collection $new_node, int $conflict, ?string $recursion, bool $recursion_first): void; |
|
265 | + Collection $new_node, int $conflict, ? string $recursion, bool $recursion_first) : void; |
|
266 | 266 | |
267 | 267 | |
268 | 268 | /** |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * @return void |
279 | 279 | */ |
280 | 280 | public function preCopyFile(File $node, Collection $parent, |
281 | - int $conflict, ?string $recursion, bool $recursion_first): void; |
|
281 | + int $conflict, ? string $recursion, bool $recursion_first) : void; |
|
282 | 282 | |
283 | 283 | |
284 | 284 | /** |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | * @return void |
296 | 296 | */ |
297 | 297 | public function postCopyFile(File $node, Collection $parent, File $new_node, |
298 | - int $conflict, ?string $recursion, bool $recursion_first): void; |
|
298 | + int $conflict, ? string $recursion, bool $recursion_first) : void; |
|
299 | 299 | |
300 | 300 | |
301 | 301 | /** |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * @param bool $recursion_first |
310 | 310 | * @return void |
311 | 311 | */ |
312 | - public function preDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void; |
|
312 | + public function preDeleteCollection(Collection $node, bool $force, ? string $recursion, bool $recursion_first) : void; |
|
313 | 313 | |
314 | 314 | |
315 | 315 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | * @param bool $recursion_first |
324 | 324 | * @return void |
325 | 325 | */ |
326 | - public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void; |
|
326 | + public function postDeleteCollection(Collection $node, bool $force, ? string $recursion, bool $recursion_first) : void; |
|
327 | 327 | |
328 | 328 | |
329 | 329 | /** |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | * @param bool $recursion_first |
338 | 338 | * @return void |
339 | 339 | */ |
340 | - public function preDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void; |
|
340 | + public function preDeleteFile(File $node, bool $force, ? string $recursion, bool $recursion_first) : void; |
|
341 | 341 | |
342 | 342 | |
343 | 343 | /** |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | * @param bool $recursion_first |
352 | 352 | * @return void |
353 | 353 | */ |
354 | - public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void; |
|
354 | + public function postDeleteFile(File $node, bool $force, ? string $recursion, bool $recursion_first) : void; |
|
355 | 355 | |
356 | 356 | |
357 | 357 | /** |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | * @return void |
368 | 368 | */ |
369 | 369 | public function preSaveNodeAttributes(INode $node, array &$save_attributes, |
370 | - array &$remove_attributes, ?string $recursion, bool $recursion_first): void; |
|
370 | + array &$remove_attributes, ? string $recursion, bool $recursion_first) : void; |
|
371 | 371 | |
372 | 372 | |
373 | 373 | /** |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | * @return void |
384 | 384 | */ |
385 | 385 | public function postSaveNodeAttributes(INode $node, array $save_attributes, |
386 | - array $remove_attributes, ?string $recursion, bool $recursion_first): void; |
|
386 | + array $remove_attributes, ? string $recursion, bool $recursion_first) : void; |
|
387 | 387 | |
388 | 388 | |
389 | 389 | /** |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | * @param bool $autocreate |
398 | 398 | * @return void |
399 | 399 | */ |
400 | - public function preInstanceUser(\Balloon\User $user, string &$username, ?array &$attributes, bool $autocreate): void; |
|
400 | + public function preInstanceUser(\Balloon\User $user, string&$username, ? array &$attributes, bool $autocreate) : void; |
|
401 | 401 | |
402 | 402 | |
403 | 403 | /** |
@@ -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 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param Iterable $config |
36 | 36 | * @return void |
37 | 37 | */ |
38 | - public function __construct(?Iterable $config, Logger $logger) |
|
38 | + public function __construct(? Iterable $config, Logger $logger) |
|
39 | 39 | { |
40 | 40 | $this->logger = $logger; |
41 | 41 | $this->setOptions($config); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @param Iterable $config |
53 | 53 | * @return PluginInterface |
54 | 54 | */ |
55 | - public function setOptions(?Iterable $config): PluginInterface |
|
55 | + public function setOptions(? Iterable $config) : PluginInterface |
|
56 | 56 | { |
57 | 57 | return $this; |
58 | 58 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param array $params |
77 | 77 | * @return void |
78 | 78 | */ |
79 | - public function __call(string $method, array $params=[]): void |
|
79 | + public function __call(string $method, array $params = []): void |
|
80 | 80 | { |
81 | 81 | if (!is_callable([$this, $method])) { |
82 | 82 | throw new Exception('invalid plugin call ['.$this->getName().'], hook ['.$method.'] does not exists'); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @param mixed $content |
146 | 146 | * @return void |
147 | 147 | */ |
148 | - public function preHttpResponse(\Balloon\Http\Response $response, int &$code, &$content): void |
|
148 | + public function preHttpResponse(\Balloon\Http\Response $response, int&$code, &$content): void |
|
149 | 149 | { |
150 | 150 | } |
151 | 151 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * @param bool $clone |
177 | 177 | * @return void |
178 | 178 | */ |
179 | - public function preCreateCollection(Collection $parent, string &$name, array &$attributes, bool $clone): void |
|
179 | + public function preCreateCollection(Collection $parent, string&$name, array &$attributes, bool $clone): void |
|
180 | 180 | { |
181 | 181 | } |
182 | 182 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * @param bool $clone |
208 | 208 | * @return void |
209 | 209 | */ |
210 | - public function preCreateFile(Collection $parent, string &$name, array &$attributes, bool $clone): void |
|
210 | + public function preCreateFile(Collection $parent, string&$name, array &$attributes, bool $clone): void |
|
211 | 211 | { |
212 | 212 | } |
213 | 213 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | * @return void |
241 | 241 | */ |
242 | 242 | public function preCopyCollection(Collection $node, Collection $parent, |
243 | - int $conflict, ?string $recursion, bool $recursion_first): void |
|
243 | + int $conflict, ? string $recursion, bool $recursion_first) : void |
|
244 | 244 | { |
245 | 245 | } |
246 | 246 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * @return void |
260 | 260 | */ |
261 | 261 | public function postCopyCollection(Collection $node, Collection $parent, |
262 | - Collection $new_node, int $conflict, ?string $recursion, bool $recursion_first): void |
|
262 | + Collection $new_node, int $conflict, ? string $recursion, bool $recursion_first) : void |
|
263 | 263 | { |
264 | 264 | } |
265 | 265 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | * @return void |
278 | 278 | */ |
279 | 279 | public function preCopyFile(File $node, Collection $parent, |
280 | - int $conflict, ?string $recursion, bool $recursion_first): void |
|
280 | + int $conflict, ? string $recursion, bool $recursion_first) : void |
|
281 | 281 | { |
282 | 282 | } |
283 | 283 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * @return void |
297 | 297 | */ |
298 | 298 | public function postCopyFile(File $node, Collection $parent, File $new_node, |
299 | - int $conflict, ?string $recursion, bool $recursion_first): void |
|
299 | + int $conflict, ? string $recursion, bool $recursion_first) : void |
|
300 | 300 | { |
301 | 301 | } |
302 | 302 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * @param bool $recursion_first |
313 | 313 | * @return void |
314 | 314 | */ |
315 | - public function preDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
315 | + public function preDeleteCollection(Collection $node, bool $force, ? string $recursion, bool $recursion_first) : void |
|
316 | 316 | { |
317 | 317 | } |
318 | 318 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * @param bool $recursion_first |
329 | 329 | * @return void |
330 | 330 | */ |
331 | - public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
331 | + public function postDeleteCollection(Collection $node, bool $force, ? string $recursion, bool $recursion_first) : void |
|
332 | 332 | { |
333 | 333 | } |
334 | 334 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * @param int $version |
343 | 343 | * @return void |
344 | 344 | */ |
345 | - public function preRestoreFile(File $node, int $version): void |
|
345 | + public function preRestoreFile(File $node, int $version) : void |
|
346 | 346 | { |
347 | 347 | } |
348 | 348 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | * @param int $version |
357 | 357 | * @return void |
358 | 358 | */ |
359 | - public function postRestoreFile(File $node, int $version): void |
|
359 | + public function postRestoreFile(File $node, int $version) : void |
|
360 | 360 | { |
361 | 361 | } |
362 | 362 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | * @param array $attributes |
373 | 373 | * @return void |
374 | 374 | */ |
375 | - public function prePutFile(File $node, $content, bool $force, array $attributes): void |
|
375 | + public function prePutFile(File $node, $content, bool $force, array $attributes) : void |
|
376 | 376 | { |
377 | 377 | } |
378 | 378 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | * @param array $attributes |
389 | 389 | * @return void |
390 | 390 | */ |
391 | - public function postPutFile(File $node, $content, bool $force, array $attributes): void |
|
391 | + public function postPutFile(File $node, $content, bool $force, array $attributes) : void |
|
392 | 392 | { |
393 | 393 | } |
394 | 394 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | * @param bool $recursion_first |
405 | 405 | * @return void |
406 | 406 | */ |
407 | - public function preDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
407 | + public function preDeleteFile(File $node, bool $force, ? string $recursion, bool $recursion_first) : void |
|
408 | 408 | { |
409 | 409 | } |
410 | 410 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | * @param bool $recursion_first |
421 | 421 | * @return void |
422 | 422 | */ |
423 | - public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
423 | + public function postDeleteFile(File $node, bool $force, ? string $recursion, bool $recursion_first) : void |
|
424 | 424 | { |
425 | 425 | } |
426 | 426 | |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * @return void |
439 | 439 | */ |
440 | 440 | public function preSaveNodeAttributes(INode $node, array &$save_attributes, |
441 | - array &$remove_attributes, ?string $recursion, bool $recursion_first): void |
|
441 | + array &$remove_attributes, ? string $recursion, bool $recursion_first) : void |
|
442 | 442 | { |
443 | 443 | } |
444 | 444 | |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | * @return void |
457 | 457 | */ |
458 | 458 | public function postSaveNodeAttributes(INode $node, array $save_attributes, |
459 | - array $remove_attributes, ?string $recursion, bool $recursion_first): void |
|
459 | + array $remove_attributes, ? string $recursion, bool $recursion_first) : void |
|
460 | 460 | { |
461 | 461 | } |
462 | 462 | |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | * @param bool $autocreate |
473 | 473 | * @return void |
474 | 474 | */ |
475 | - public function preInstanceUser(\Balloon\User $user, string &$username, ?array &$attributes, bool $autocreate): void |
|
475 | + public function preInstanceUser(\Balloon\User $user, string&$username, ? array &$attributes, bool $autocreate) : void |
|
476 | 476 | { |
477 | 477 | } |
478 | 478 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | * @param \Balloon\User $user |
486 | 486 | * @return void |
487 | 487 | */ |
488 | - public function postInstanceUser(\Balloon\User $user): void |
|
488 | + public function postInstanceUser(\Balloon\User $user) : void |
|
489 | 489 | { |
490 | 490 | } |
491 | 491 | } |