@@ -70,15 +70,15 @@ discard block |
||
70 | 70 | if (mb_strpos($referenceText, $start) === 0) { |
71 | 71 | $parts = parse_url($referenceText); |
72 | 72 | parse_str($parts['query'], $query); |
73 | - $fileId = isset($query['fileid']) ? (int)$query['fileid'] : $fileId; |
|
74 | - $fileId = isset($query['openfile']) ? (int)$query['openfile'] : $fileId; |
|
73 | + $fileId = isset($query['fileid']) ? (int) $query['fileid'] : $fileId; |
|
74 | + $fileId = isset($query['openfile']) ? (int) $query['openfile'] : $fileId; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | if (mb_strpos($referenceText, $startIndex) === 0) { |
78 | 78 | $parts = parse_url($referenceText); |
79 | 79 | parse_str($parts['query'], $query); |
80 | - $fileId = isset($query['fileid']) ? (int)$query['fileid'] : $fileId; |
|
81 | - $fileId = isset($query['openfile']) ? (int)$query['openfile'] : $fileId; |
|
80 | + $fileId = isset($query['fileid']) ? (int) $query['fileid'] : $fileId; |
|
81 | + $fileId = isset($query['openfile']) ? (int) $query['openfile'] : $fileId; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | if (mb_strpos($referenceText, $this->urlGenerator->getAbsoluteURL('/index.php/f/')) === 0) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $fileId = str_replace($this->urlGenerator->getAbsoluteURL('/f/'), '', $referenceText); |
90 | 90 | } |
91 | 91 | |
92 | - return $fileId !== null ? (int)$fileId : null; |
|
92 | + return $fileId !== null ? (int) $fileId : null; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | public function resolveReference(string $referenceText): ?IReference { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | $reference->setTitle($file->getName()); |
135 | 135 | $reference->setDescription($file->getMimetype()); |
136 | - $reference->setUrl($this->urlGenerator->getAbsoluteURL('/index.php/f/' . $fileId)); |
|
136 | + $reference->setUrl($this->urlGenerator->getAbsoluteURL('/index.php/f/'.$fileId)); |
|
137 | 137 | if ($this->previewManager->isMimeSupported($file->getMimeType())) { |
138 | 138 | $reference->setImageUrl($this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', ['x' => 1600, 'y' => 630, 'fileId' => $fileId])); |
139 | 139 | } else { |
@@ -150,13 +150,13 @@ discard block |
||
150 | 150 | 'mimetype' => $file->getMimetype(), |
151 | 151 | 'preview-available' => $this->previewManager->isAvailable($file) |
152 | 152 | ]); |
153 | - } catch (InvalidPathException|NotFoundException|NotPermittedException|NoUserException $e) { |
|
153 | + } catch (InvalidPathException | NotFoundException | NotPermittedException | NoUserException $e) { |
|
154 | 154 | throw new NotFoundException(); |
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
158 | 158 | public function getCachePrefix(string $referenceId): string { |
159 | - return (string)$this->getFilesAppLinkId($referenceId); |
|
159 | + return (string) $this->getFilesAppLinkId($referenceId); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | public function getCacheKey(string $referenceId): ?string { |