@@ -148,7 +148,7 @@ |
||
| 148 | 148 | * @param ObjectId $session_id |
| 149 | 149 | * @param string $access_token |
| 150 | 150 | * |
| 151 | - * @return Session |
|
| 151 | + * @return Session|null |
|
| 152 | 152 | */ |
| 153 | 153 | public static function getByAccessToken(Server $server, ObjectId $session_id, string $access_token): self |
| 154 | 154 | { |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -35,7 +35,6 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * Constructor. |
| 37 | 37 | * |
| 38 | - * @param App $app |
|
| 39 | 38 | * @param Server $server |
| 40 | 39 | */ |
| 41 | 40 | public function __construct(PreviewCreator $preview, Server $server) |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -31,8 +31,6 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * Constructor. |
| 33 | 33 | * |
| 34 | - * @param Router $router |
|
| 35 | - * @param Hook $hook |
|
| 36 | 34 | */ |
| 37 | 35 | public function __construct(Database $db, LoggerInterface $logger, Converter $converter) |
| 38 | 36 | { |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | * Create result. |
| 33 | 33 | * |
| 34 | 34 | * @param string $path |
| 35 | - * @param resource $stream |
|
| 36 | - * @param null|mixed $resource |
|
| 35 | + * @param resource $resource |
|
| 37 | 36 | */ |
| 38 | 37 | public function __construct(string $path, $resource = null) |
| 39 | 38 | { |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | /** |
| 30 | 30 | * Delete file. |
| 31 | 31 | * |
| 32 | - * @param string $id |
|
| 33 | 32 | * @param array $attributes |
| 34 | 33 | * |
| 35 | 34 | * @return bool |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | * @param string $path |
| 695 | 695 | * @param bool $new |
| 696 | 696 | * |
| 697 | - * @return bool |
|
| 697 | + * @return string |
|
| 698 | 698 | */ |
| 699 | 699 | protected function verifyFile(?string $path, bool $new = false): string |
| 700 | 700 | { |
@@ -827,7 +827,7 @@ discard block |
||
| 827 | 827 | /** |
| 828 | 828 | * Finalize put request. |
| 829 | 829 | * |
| 830 | - * @param resource|string $file |
|
| 830 | + * @param string|null $file |
|
| 831 | 831 | * @param bool $new |
| 832 | 832 | * @param array $attributes |
| 833 | 833 | * |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | * @param array |
| 46 | 46 | **/ |
| 47 | 47 | protected $temp_files = [ |
| 48 | - '/^\._(.*)$/', // OS/X resource forks |
|
| 49 | - '/^.DS_Store$/', // OS/X custom folder settings |
|
| 48 | + '/^\._(.*)$/', // OS/X resource forks |
|
| 49 | + '/^.DS_Store$/', // OS/X custom folder settings |
|
| 50 | 50 | '/^desktop.ini$/', // Windows custom folder settings |
| 51 | - '/^Thumbs.db$/', // Windows thumbnail cache |
|
| 52 | - '/^.(.*).swpx$/', // ViM temporary files |
|
| 53 | - '/^.(.*).swx$/', // ViM temporary files |
|
| 54 | - '/^.(.*).swp$/', // ViM temporary files |
|
| 55 | - '/^\.dat(.*)$/', // Smultron seems to create these |
|
| 51 | + '/^Thumbs.db$/', // Windows thumbnail cache |
|
| 52 | + '/^.(.*).swpx$/', // ViM temporary files |
|
| 53 | + '/^.(.*).swx$/', // ViM temporary files |
|
| 54 | + '/^.(.*).swp$/', // ViM temporary files |
|
| 55 | + '/^\.dat(.*)$/', // Smultron seems to create these |
|
| 56 | 56 | '/^~lock.(.*)#$/', // Windows 7 lockfiles |
| 57 | 57 | ]; |
| 58 | 58 | |
@@ -108,14 +108,13 @@ |
||
| 108 | 108 | * |
| 109 | 109 | * @param bool $reference |
| 110 | 110 | * |
| 111 | - * @return ObjectId |
|
| 111 | + * @return ObjectId|null |
|
| 112 | 112 | */ |
| 113 | 113 | public function getShareId(bool $reference = false): ?ObjectId; |
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * Get share node. |
| 117 | 117 | * |
| 118 | - * @param bool $reference |
|
| 119 | 118 | * |
| 120 | 119 | * @return Collection |
| 121 | 120 | */ |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * |
| 61 | 61 | * @param Server $server |
| 62 | 62 | * @param Acl $acl |
| 63 | - * @param Decorator $role_decorator |
|
| 63 | + * @param RoleAttributeDecorator $role_decorator |
|
| 64 | 64 | */ |
| 65 | 65 | public function __construct(Server $server, Acl $acl, RoleAttributeDecorator $role_decorator) |
| 66 | 66 | { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -131,20 +131,20 @@ discard block |
||
| 131 | 131 | 'mime' => (string) $attributes['mime'], |
| 132 | 132 | 'readonly' => (bool) $attributes['readonly'], |
| 133 | 133 | 'directory' => $node instanceof Collection, |
| 134 | - 'meta' => function ($node) { |
|
| 134 | + 'meta' => function($node) { |
|
| 135 | 135 | return (object) $node->getMetaAttributes(); |
| 136 | 136 | }, |
| 137 | - 'size' => function ($node) { |
|
| 137 | + 'size' => function($node) { |
|
| 138 | 138 | return $node->getSize(); |
| 139 | 139 | }, |
| 140 | - 'path' => function ($node) { |
|
| 140 | + 'path' => function($node) { |
|
| 141 | 141 | try { |
| 142 | 142 | return $node->getPath(); |
| 143 | 143 | } catch (\Exception $e) { |
| 144 | 144 | return null; |
| 145 | 145 | } |
| 146 | 146 | }, |
| 147 | - 'parent' => function ($node) { |
|
| 147 | + 'parent' => function($node) { |
|
| 148 | 148 | $parent = $node->getParent(); |
| 149 | 149 | |
| 150 | 150 | if (null === $parent || $parent->isRoot()) { |
@@ -153,10 +153,10 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | return $this->decorate($node->getParent(), ['id', 'name', '_links']); |
| 155 | 155 | }, |
| 156 | - 'access' => function ($node) use ($acl) { |
|
| 156 | + 'access' => function($node) use ($acl) { |
|
| 157 | 157 | return $acl->getAclPrivilege($node); |
| 158 | 158 | }, |
| 159 | - 'share' => function ($node) { |
|
| 159 | + 'share' => function($node) { |
|
| 160 | 160 | if ($node->isShared() || !$node->isSpecial()) { |
| 161 | 161 | return null; |
| 162 | 162 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | return null; |
| 168 | 168 | } |
| 169 | 169 | }, |
| 170 | - 'sharename' => function ($node) { |
|
| 170 | + 'sharename' => function($node) { |
|
| 171 | 171 | if (!$node->isShared()) { |
| 172 | 172 | return null; |
| 173 | 173 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | return null; |
| 179 | 179 | } |
| 180 | 180 | }, |
| 181 | - 'shareowner' => function ($node) use ($server, $fs, $decorator) { |
|
| 181 | + 'shareowner' => function($node) use ($server, $fs, $decorator) { |
|
| 182 | 182 | if (!$node->isSpecial()) { |
| 183 | 183 | return null; |
| 184 | 184 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | return null; |
| 193 | 193 | } |
| 194 | 194 | }, |
| 195 | - 'owner' => function ($node) use ($server, $decorator) { |
|
| 195 | + 'owner' => function($node) use ($server, $decorator) { |
|
| 196 | 196 | try { |
| 197 | 197 | return $decorator->decorate( |
| 198 | 198 | $server->getUserById($node->getOwner()), |
@@ -216,20 +216,20 @@ discard block |
||
| 216 | 216 | protected function getTimeAttributes(NodeInterface $node, array $attributes): array |
| 217 | 217 | { |
| 218 | 218 | return [ |
| 219 | - 'created' => function ($node) use ($attributes) { |
|
| 219 | + 'created' => function($node) use ($attributes) { |
|
| 220 | 220 | return $attributes['created']->toDateTime()->format('c'); |
| 221 | 221 | }, |
| 222 | - 'changed' => function ($node) use ($attributes) { |
|
| 222 | + 'changed' => function($node) use ($attributes) { |
|
| 223 | 223 | return $attributes['changed']->toDateTime()->format('c'); |
| 224 | 224 | }, |
| 225 | - 'deleted' => function ($node) use ($attributes) { |
|
| 225 | + 'deleted' => function($node) use ($attributes) { |
|
| 226 | 226 | if (false === $attributes['deleted']) { |
| 227 | 227 | return null; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | return $attributes['deleted']->toDateTime()->format('c'); |
| 231 | 231 | }, |
| 232 | - 'destroy' => function ($node) use ($attributes) { |
|
| 232 | + 'destroy' => function($node) use ($attributes) { |
|
| 233 | 233 | if (null === $attributes['destroy']) { |
| 234 | 234 | return null; |
| 235 | 235 | } |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | return [ |
| 263 | 263 | 'shared' => $node->isShared(), |
| 264 | 264 | 'reference' => $node->isReference(), |
| 265 | - 'filter' => function ($node) use ($attributes) { |
|
| 265 | + 'filter' => function($node) use ($attributes) { |
|
| 266 | 266 | if (null === $attributes['filter']) { |
| 267 | 267 | return null; |
| 268 | 268 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |