@@ -32,7 +32,7 @@ |
||
32 | 32 | * @param string[] $whiteListFunctions a list of function names that can be called |
33 | 33 | * @param string[] $jailedFunctions a list of functions that will be redirected to another function |
34 | 34 | */ |
35 | - public function __construct(TemplateReadyDocument &$object, private readonly array $whiteListFunctions, private array $jailedFunctions = []) |
|
35 | + public function __construct(TemplateReadyDocument & $object, private readonly array $whiteListFunctions, private array $jailedFunctions = []) |
|
36 | 36 | { |
37 | 37 | $this->object = &$object; |
38 | 38 | $this->debugInfo = []; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * Get the current File object. |
124 | 124 | */ |
125 | - public function current(): File|Folder |
|
125 | + public function current(): File | Folder |
|
126 | 126 | { |
127 | 127 | /** @var SplFileInfo $current */ |
128 | 128 | $current = parent::current(); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | /** |
139 | 139 | * {@inheritdoc} |
140 | 140 | */ |
141 | - public function getChildren(): FileExplorer|RecursiveFilterIterator|null |
|
141 | + public function getChildren(): FileExplorer | RecursiveFilterIterator | null |
|
142 | 142 | { |
143 | 143 | $explorer = new self( |
144 | 144 | $this->getInnerIterator()->getChildren(), |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * |
199 | 199 | * @deprecated use `FileExplorer::createFromDefinition()` instead |
200 | 200 | */ |
201 | - public static function create(string|Folder $folder, array $includes = [], array $excludes = [], ?int $flags = null): FileExplorer |
|
201 | + public static function create(string | Folder $folder, array $includes = [], array $excludes = [], ?int $flags = null): FileExplorer |
|
202 | 202 | { |
203 | 203 | $folder = fs::realpath($folder); |
204 | 204 | $iterator = new RecursiveDirectoryIterator((string)$folder, RecursiveDirectoryIterator::SKIP_DOTS); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @throws FileNotFoundException |
26 | 26 | */ |
27 | - public function __construct(protected string|FilesystemPath $rawPath) |
|
27 | + public function __construct(protected string | FilesystemPath $rawPath) |
|
28 | 28 | { |
29 | 29 | $realPath = fs::realpath($rawPath); |
30 | 30 |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * |
224 | 224 | * @return false|T |
225 | 225 | */ |
226 | - public function realpath(string|BaseFilesystemItem $path): false|string|BaseFilesystemItem |
|
226 | + public function realpath(string | BaseFilesystemItem $path): false | string | BaseFilesystemItem |
|
227 | 227 | { |
228 | 228 | return $this->isVFS($path) ? $path : realpath((string)$path); |
229 | 229 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | /** |
232 | 232 | * Check whether a given path is on the virtual filesystem. |
233 | 233 | */ |
234 | - public function isVFS(string|BaseFilesystemItem $path): bool |
|
234 | + public function isVFS(string | BaseFilesystemItem $path): bool |
|
235 | 235 | { |
236 | 236 | return str_starts_with((string)$path, 'vfs://'); |
237 | 237 | } |
@@ -162,12 +162,12 @@ discard block |
||
162 | 162 | } |
163 | 163 | } |
164 | 164 | |
165 | - protected function addFileToTracker(File &$file): void |
|
165 | + protected function addFileToTracker(File & $file): void |
|
166 | 166 | { |
167 | 167 | $this->trackedItemsFlattened[$file->getRelativeFilePath()] = &$file; |
168 | 168 | } |
169 | 169 | |
170 | - protected function delFileFromTracker(File &$file): void |
|
170 | + protected function delFileFromTracker(File & $file): void |
|
171 | 171 | { |
172 | 172 | unset($this->trackedItemsFlattened[$file->getRelativeFilePath()]); |
173 | 173 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @param null|string $namespace |
179 | 179 | */ |
180 | - protected function addObjectToTracker(ReadableDocument &$trackedItem, $namespace = null): void |
|
180 | + protected function addObjectToTracker(ReadableDocument & $trackedItem, $namespace = null): void |
|
181 | 181 | { |
182 | 182 | if ($namespace == null) { |
183 | 183 | $this->trackedItems[$trackedItem->getIndexName()] = &$trackedItem; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @param null|string $namespace |
195 | 195 | */ |
196 | - protected function delObjectFromTracker(ReadableDocument &$trackedItem, $namespace = null): void |
|
196 | + protected function delObjectFromTracker(ReadableDocument & $trackedItem, $namespace = null): void |
|
197 | 197 | { |
198 | 198 | if ($namespace == null) { |
199 | 199 | unset($this->trackedItems[$trackedItem->getIndexName()]); |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * |
180 | 180 | * @since 0.2.0 |
181 | 181 | */ |
182 | - public function trackNewPageView(BasePageView|DynamicPageView|RepeaterPageView|StaticPageView $pageView): void |
|
182 | + public function trackNewPageView(BasePageView | DynamicPageView | RepeaterPageView | StaticPageView $pageView): void |
|
183 | 183 | { |
184 | 184 | $namespace = $pageView->getType(); |
185 | 185 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | private readonly FilesystemPath $folder; |
23 | 23 | |
24 | - public function __construct(string|FilesystemPath $folderPath) |
|
24 | + public function __construct(string | FilesystemPath $folderPath) |
|
25 | 25 | { |
26 | 26 | $this->frozen = false; |
27 | 27 | $this->folder = new FilesystemPath($folderPath); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * {@inheritdoc} |
29 | 29 | */ |
30 | - public function getParentTemplate(): false|self |
|
30 | + public function getParentTemplate(): false | self |
|
31 | 31 | { |
32 | 32 | $parent = $this->template->getParent([]); |
33 | 33 |