@@ -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 |
@@ -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 | } |
@@ -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 |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param Iterable $config |
| 32 | 32 | * @return PluginInterface |
| 33 | 33 | */ |
| 34 | - public function setOptions(?Iterable $config): PluginInterface |
|
| 34 | + public function setOptions(?Iterable $config) : PluginInterface |
|
| 35 | 35 | { |
| 36 | 36 | if ($config === null) { |
| 37 | 37 | return $this; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function cli(Filesystem $fs): void |
| 59 | 59 | { |
| 60 | - $lt = time() - $this->max_age; |
|
| 60 | + $lt = time() - $this->max_age; |
|
| 61 | 61 | |
| 62 | 62 | $result = $fs->findNodesWithCustomFilter(['deleted' => ['$lt' => new UTCDateTime($lt)]]); |
| 63 | 63 | $this->logger->info('found ['.count($result).'] nodes for cleanup, force remove them from trash', [ |
@@ -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 |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * @return void |
| 126 | 126 | */ |
| 127 | 127 | public function postCopyCollection(Collection $node, Collection $parent, |
| 128 | - Collection $new_node, int $conflict, ?string $recursion, bool $recursion_first): void |
|
| 128 | + Collection $new_node, int $conflict, ?string $recursion, bool $recursion_first) : void |
|
| 129 | 129 | { |
| 130 | 130 | if ($recursion_first === false) { |
| 131 | 131 | return; |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @return void |
| 163 | 163 | */ |
| 164 | 164 | public function postCopyFile(File $node, Collection $parent, File $new_node, |
| 165 | - int $conflict, ?string $recursion, bool $recursion_first): void |
|
| 165 | + int $conflict, ?string $recursion, bool $recursion_first) : void |
|
| 166 | 166 | { |
| 167 | 167 | if ($recursion_first === false) { |
| 168 | 168 | return; |
@@ -229,14 +229,14 @@ discard block |
||
| 229 | 229 | * @param bool $recursion_first |
| 230 | 230 | * @return void |
| 231 | 231 | */ |
| 232 | - public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
| 232 | + public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first) : void |
|
| 233 | 233 | { |
| 234 | 234 | if ($recursion_first === false) { |
| 235 | 235 | return; |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | $attributes = $node->getAttribute(['parent', 'name']); |
| 239 | - $attributes['node'] = $node->getId(); |
|
| 239 | + $attributes['node'] = $node->getId(); |
|
| 240 | 240 | |
| 241 | 241 | |
| 242 | 242 | if ($node->isReference()) { |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | $attributes['share'] = $node->getShareId(); |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - $attributes['client']= $this->client; |
|
| 260 | + $attributes['client'] = $this->client; |
|
| 261 | 261 | $attributes['owner'] = $this->getEventOwner($node); |
| 262 | 262 | $attributes['force'] = $force; |
| 263 | 263 | $node->getFilesystem()->getDelta()->add($attributes); |
@@ -292,14 +292,14 @@ discard block |
||
| 292 | 292 | * @param bool $recursion_first |
| 293 | 293 | * @return void |
| 294 | 294 | */ |
| 295 | - public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void |
|
| 295 | + public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first) : void |
|
| 296 | 296 | { |
| 297 | 297 | if ($recursion_first === false) { |
| 298 | 298 | return; |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | $attributes = $node->getAttribute(['parent', 'name']); |
| 302 | - $attributes['node'] = $node->getId(); |
|
| 302 | + $attributes['node'] = $node->getId(); |
|
| 303 | 303 | |
| 304 | 304 | if ($force === true) { |
| 305 | 305 | $attributes['operation'] = 'forceDeleteFile'; |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $attributes['share'] = $node->getShareId(); |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | - $attributes['client']= $this->client; |
|
| 314 | + $attributes['client'] = $this->client; |
|
| 315 | 315 | $attributes['owner'] = $this->getEventOwner($node); |
| 316 | 316 | $attributes['force'] = $force; |
| 317 | 317 | $node->getFilesystem()->getDelta()->add($attributes); |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | * @param bool $recursion_first |
| 331 | 331 | * @return void |
| 332 | 332 | */ |
| 333 | - public function postSaveNodeAttributes(INode $node, array $attributes, array $remove, ?string $recursion, bool $recursion_first): void |
|
| 333 | + public function postSaveNodeAttributes(INode $node, array $attributes, array $remove, ?string $recursion, bool $recursion_first) : void |
|
| 334 | 334 | { |
| 335 | 335 | if ($recursion_first === false) { |
| 336 | 336 | return; |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - $log['client']= $this->client; |
|
| 416 | + $log['client'] = $this->client; |
|
| 417 | 417 | |
| 418 | 418 | if (isset($log['operation'])) { |
| 419 | 419 | $node->getFilesystem()->getDelta()->add($log); |
@@ -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 |
@@ -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 | if ($config === null) { |
| 58 | 58 | return $this; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @param bool $recursion_first |
| 108 | 108 | * @return void |
| 109 | 109 | */ |
| 110 | - public function postSaveNodeAttributes(INode $node, array $attributes, array $remove, ?string $recursion, bool $recursion_first): void |
|
| 110 | + public function postSaveNodeAttributes(INode $node, array $attributes, array $remove, ?string $recursion, bool $recursion_first) : void |
|
| 111 | 111 | { |
| 112 | 112 | if (!($node instanceof Collection)) { |
| 113 | 113 | return; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $acl = $node->getShare(); |
| 124 | 124 | $resource = new Resource($fs->getUser(), $this->logger, $fs); |
| 125 | 125 | if ($node->isShared() && is_array($acl) && (isset($raw['acl']) && $raw['acl'] !== $node->getAcl() || !isset($raw['acl']))) { |
| 126 | - $receiver=[]; |
|
| 126 | + $receiver = []; |
|
| 127 | 127 | foreach ($acl as $rule) { |
| 128 | 128 | if ($rule['type'] == 'user') { |
| 129 | 129 | $user = new User($rule['name'], $this->logger, $fs, true, false); |
@@ -142,14 +142,14 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | if (!empty($receiver)) { |
| 145 | - $body = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function ($match) use ($node) { |
|
| 145 | + $body = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function($match) use ($node) { |
|
| 146 | 146 | return $node->getAttribute($match[2]); |
| 147 | 147 | }, $this->notifications['new_share']['body']); |
| 148 | - $subject = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function ($match) use ($node) { |
|
| 148 | + $subject = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function($match) use ($node) { |
|
| 149 | 149 | return $node->getAttribute($match[2]); |
| 150 | 150 | }, $this->notifications['new_share']['subject']); |
| 151 | 151 | |
| 152 | - $mail = new Message(); |
|
| 152 | + $mail = new Message(); |
|
| 153 | 153 | $mail->setBody($body); |
| 154 | 154 | $mail->setFrom($this->notifications['new_share']['sender']['address'], |
| 155 | 155 | $this->notifications['new_share']['sender']['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 |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param Iterable $config |
| 33 | 33 | * @return PluginInterface |
| 34 | 34 | */ |
| 35 | - public function setOptions(?Iterable $config): PluginInterface |
|
| 35 | + public function setOptions(?Iterable $config) : PluginInterface |
|
| 36 | 36 | { |
| 37 | 37 | if ($config === null) { |
| 38 | 38 | return $this; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @param bool $autocreate |
| 58 | 58 | * @return void |
| 59 | 59 | */ |
| 60 | - public function preInstanceUser(User $user, string &$username, ?array &$attributes, bool $autocreate): void |
|
| 60 | + public function preInstanceUser(User $user, string&$username, ? array &$attributes, bool $autocreate) : void |
|
| 61 | 61 | { |
| 62 | 62 | if ($autocreate === false || $attributes !== null) { |
| 63 | 63 | return; |
@@ -84,19 +84,19 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | switch ($value['type']) { |
| 86 | 86 | case 'string': |
| 87 | - $attributes[$attr] = (string)$value['value']; |
|
| 87 | + $attributes[$attr] = (string)$value['value']; |
|
| 88 | 88 | break; |
| 89 | 89 | |
| 90 | 90 | case 'int': |
| 91 | - $attributes[$attr] = (int)$value['value']; |
|
| 91 | + $attributes[$attr] = (int)$value['value']; |
|
| 92 | 92 | break; |
| 93 | 93 | |
| 94 | 94 | case 'bool': |
| 95 | - $attributes[$attr] = (bool)$value['value']; |
|
| 95 | + $attributes[$attr] = (bool)$value['value']; |
|
| 96 | 96 | break; |
| 97 | 97 | |
| 98 | 98 | case 'binary': |
| 99 | - $attributes[$attr] = new Binary($value['value']); |
|
| 99 | + $attributes[$attr] = new Binary($value['value']); |
|
| 100 | 100 | break; |
| 101 | 101 | |
| 102 | 102 | default: |
@@ -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 |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @param Iterable $config |
| 59 | 59 | * @return PluginInterface |
| 60 | 60 | */ |
| 61 | - public function setOptions(?Iterable $config): PluginInterface |
|
| 61 | + public function setOptions(?Iterable $config) : PluginInterface |
|
| 62 | 62 | { |
| 63 | 63 | if ($config === null) { |
| 64 | 64 | return $this; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | 'category' => get_class($this), |
| 101 | 101 | ]); |
| 102 | 102 | |
| 103 | - $result = $this->_findShare($share); |
|
| 103 | + $result = $this->_findShare($share); |
|
| 104 | 104 | $shares = array_merge_recursive($shares, $result); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | 'category' => get_class($this), |
| 122 | 122 | ]); |
| 123 | 123 | |
| 124 | - $owner = new User($owner, $this->logger, $this->fs, true); |
|
| 124 | + $owner = new User($owner, $this->logger, $this->fs, true); |
|
| 125 | 125 | $this->fs->setUser($owner); |
| 126 | 126 | $root = $this->fs->getRoot(); |
| 127 | 127 | |
@@ -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 |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @param UTCDateTime $date |
| 50 | 50 | * @return StdClass |
| 51 | 51 | */ |
| 52 | - public static function DateTimeToUnix(?UTCDateTime $date): ?Stdclass |
|
| 52 | + public static function DateTimeToUnix(?UTCDateTime $date) : ?Stdclass |
|
| 53 | 53 | { |
| 54 | 54 | if ($date === null) { |
| 55 | 55 | return null; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public static function isValidTimeStamp(string $timestamp): bool |
| 149 | 149 | { |
| 150 | - return ((string) (int) $timestamp === $timestamp) |
|
| 150 | + return ((string)(int)$timestamp === $timestamp) |
|
| 151 | 151 | && ($timestamp <= PHP_INT_MAX) |
| 152 | 152 | && ($timestamp >= ~PHP_INT_MAX); |
| 153 | 153 | } |