@@ -127,20 +127,20 @@ discard block |
||
| 127 | 127 | 'mime' => (string) $attributes['mime'], |
| 128 | 128 | 'readonly' => (bool) $attributes['readonly'], |
| 129 | 129 | 'directory' => $node instanceof Collection, |
| 130 | - 'meta' => function ($node) { |
|
| 130 | + 'meta' => function($node) { |
|
| 131 | 131 | return (object) $node->getMetaAttributes(); |
| 132 | 132 | }, |
| 133 | - 'size' => function ($node) { |
|
| 133 | + 'size' => function($node) { |
|
| 134 | 134 | return $node->getSize(); |
| 135 | 135 | }, |
| 136 | - 'path' => function ($node) { |
|
| 136 | + 'path' => function($node) { |
|
| 137 | 137 | try { |
| 138 | 138 | return $node->getPath(); |
| 139 | 139 | } catch (\Exception $e) { |
| 140 | 140 | return null; |
| 141 | 141 | } |
| 142 | 142 | }, |
| 143 | - 'parent' => function ($node) { |
|
| 143 | + 'parent' => function($node) { |
|
| 144 | 144 | $parent = $node->getParent(); |
| 145 | 145 | |
| 146 | 146 | if (null === $parent || $parent->isRoot()) { |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | return (string) $parent->getId(); |
| 151 | 151 | }, |
| 152 | - 'access' => function ($node) use ($acl) { |
|
| 152 | + 'access' => function($node) use ($acl) { |
|
| 153 | 153 | return $acl->getAclPrivilege($node); |
| 154 | 154 | }, |
| 155 | - 'share' => function ($node) { |
|
| 155 | + 'share' => function($node) { |
|
| 156 | 156 | if (!$node->isShared() && !$node->isSpecial()) { |
| 157 | 157 | return false; |
| 158 | 158 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | return false; |
| 164 | 164 | } |
| 165 | 165 | }, |
| 166 | - 'shareowner' => function ($node) use ($server, $fs) { |
|
| 166 | + 'shareowner' => function($node) use ($server, $fs) { |
|
| 167 | 167 | if (!$node->isSpecial()) { |
| 168 | 168 | return null; |
| 169 | 169 | } |
@@ -206,20 +206,20 @@ discard block |
||
| 206 | 206 | protected function getTimeAttributes(NodeInterface $node, array $attributes): array |
| 207 | 207 | { |
| 208 | 208 | return [ |
| 209 | - 'created' => function ($node) use ($attributes) { |
|
| 209 | + 'created' => function($node) use ($attributes) { |
|
| 210 | 210 | return $this->dateTimeToUnix($attributes['created']); |
| 211 | 211 | }, |
| 212 | - 'changed' => function ($node) use ($attributes) { |
|
| 212 | + 'changed' => function($node) use ($attributes) { |
|
| 213 | 213 | return $this->dateTimeToUnix($attributes['changed']); |
| 214 | 214 | }, |
| 215 | - 'deleted' => function ($node) use ($attributes) { |
|
| 215 | + 'deleted' => function($node) use ($attributes) { |
|
| 216 | 216 | if (false === $attributes['deleted']) { |
| 217 | 217 | return false; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | return $this->dateTimeToUnix($attributes['deleted']); |
| 221 | 221 | }, |
| 222 | - 'destroy' => function ($node) use ($attributes) { |
|
| 222 | + 'destroy' => function($node) use ($attributes) { |
|
| 223 | 223 | if (null === $attributes['destroy']) { |
| 224 | 224 | return null; |
| 225 | 225 | } |