@@ -45,8 +45,8 @@ |
||
| 45 | 45 | return; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - $event->addEntityCollection('files', function ($name): bool { |
|
| 49 | - $nodes = $this->rootFolder->getUserFolder($this->userId)->getById((int)$name); |
|
| 48 | + $event->addEntityCollection('files', function($name): bool { |
|
| 49 | + $nodes = $this->rootFolder->getUserFolder($this->userId)->getById((int) $name); |
|
| 50 | 50 | return !empty($nodes); |
| 51 | 51 | }); |
| 52 | 52 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * SPDX-License-Identifier: AGPL-3.0-only |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -require_once __DIR__ . '/../lib/base.php'; |
|
| 8 | +require_once __DIR__.'/../lib/base.php'; |
|
| 9 | 9 | |
| 10 | 10 | header('Content-Type: application/json'); |
| 11 | 11 | |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | |
| 146 | 146 | $folder->method('getFile') |
| 147 | 147 | ->willReturnCallback( |
| 148 | - function ($fileName) use ($file) { |
|
| 148 | + function($fileName) use ($file) { |
|
| 149 | 149 | if ($fileName === 'file.css') { |
| 150 | 150 | return $file; |
| 151 | 151 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | $this->userManager |
| 40 | 40 | ->method('get') |
| 41 | - ->willReturnCallback(function ($uid) use ($user) { |
|
| 41 | + ->willReturnCallback(function($uid) use ($user) { |
|
| 42 | 42 | if ($uid === 'foo') { |
| 43 | 43 | return $user; |
| 44 | 44 | } |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | |
| 146 | 146 | $folder->method('getFile') |
| 147 | 147 | ->willReturnCallback( |
| 148 | - function ($fileName) use ($file) { |
|
| 148 | + function($fileName) use ($file) { |
|
| 149 | 149 | if ($fileName === 'file.js') { |
| 150 | 150 | return $file; |
| 151 | 151 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->random->method('generate') |
| 129 | 129 | ->with( |
| 130 | 130 | 72, |
| 131 | - ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS |
|
| 131 | + ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS |
|
| 132 | 132 | )->willReturn('myToken'); |
| 133 | 133 | |
| 134 | 134 | $this->tokenProvider->expects($this->once()) |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $this->random->method('generate') |
| 170 | 170 | ->with( |
| 171 | 171 | 72, |
| 172 | - ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS |
|
| 172 | + ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS |
|
| 173 | 173 | )->willReturn('myToken'); |
| 174 | 174 | |
| 175 | 175 | $this->tokenProvider->expects($this->once()) |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | |
| 138 | 138 | $this->input->expects($this->any()) |
| 139 | 139 | ->method('getOption') |
| 140 | - ->willReturnCallback(function ($callOption) use ($option) { |
|
| 140 | + ->willReturnCallback(function($callOption) use ($option) { |
|
| 141 | 141 | return $callOption === $option; |
| 142 | 142 | }); |
| 143 | 143 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | )->willReturn([$tag1, $tag2, $tag3]); |
| 61 | 61 | |
| 62 | 62 | $this->input->method('getOption') |
| 63 | - ->willReturnCallback(function ($arg) { |
|
| 63 | + ->willReturnCallback(function($arg) { |
|
| 64 | 64 | if ($arg === 'visibilityFilter') { |
| 65 | 65 | return null; |
| 66 | 66 | } elseif ($arg === 'nameSearchPattern') { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ->willReturn($appDataFolder); |
| 60 | 60 | |
| 61 | 61 | $this->output->expects($this->exactly(3))->method('writeln') |
| 62 | - ->with(self::callback(function (string $message): bool { |
|
| 62 | + ->with(self::callback(function(string $message): bool { |
|
| 63 | 63 | static $i = 0; |
| 64 | 64 | return match (++$i) { |
| 65 | 65 | 1 => $message === 'Preview folder deleted', |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | ->willReturn($appDataFolder); |
| 162 | 162 | |
| 163 | 163 | $this->output->expects($this->exactly(2))->method('writeln') |
| 164 | - ->with(self::callback(function (string $message): bool { |
|
| 164 | + ->with(self::callback(function(string $message): bool { |
|
| 165 | 165 | static $i = 0; |
| 166 | 166 | return match (++$i) { |
| 167 | 167 | 1 => $message === 'Preview folder deleted', |