Completed
Push — chore/php-8-migration ( 83422f...0b97e4 )
by Vladimir
07:07
created
tests/StakxTestCase.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     // Mock Objects
226 226
     //
227 227
 
228
-    protected function getMockAssetEngineManager(): MockBuilder|AssetEngineManager
228
+    protected function getMockAssetEngineManager(): MockBuilder | AssetEngineManager
229 229
     {
230 230
         return new AssetEngineManager();
231 231
     }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         return new AssetManager($this->getMockEventDispatcher(), $this->getMockLogger());
236 236
     }
237 237
 
238
-    protected function getMockConfiguration(): MockObject|Configuration
238
+    protected function getMockConfiguration(): MockObject | Configuration
239 239
     {
240 240
         $stub = $this->getMockBuilder(Configuration::class)
241 241
             ->disableOriginalConstructor()
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         return $stub;
249 249
     }
250 250
 
251
-    protected function getMockPageManager(): PageManager|MockObject
251
+    protected function getMockPageManager(): PageManager | MockObject
252 252
     {
253 253
         $stub = $this->getMockBuilder(PageManager::class)
254 254
             ->disableOriginalConstructor()
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         return $stub;
261 261
     }
262 262
 
263
-    protected function getMockMenuManager(): MockObject|MenuManager
263
+    protected function getMockMenuManager(): MockObject | MenuManager
264 264
     {
265 265
         $stub = $this->getMockBuilder(MenuManager::class)
266 266
             ->disableOriginalConstructor()
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         return $stub;
273 273
     }
274 274
 
275
-    protected function getMockCollectionManager(): MockObject|CollectionManager
275
+    protected function getMockCollectionManager(): MockObject | CollectionManager
276 276
     {
277 277
         $stub = $this->getMockBuilder(CollectionManager::class)
278 278
             ->disableOriginalConstructor()
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         return $stub;
285 285
     }
286 286
 
287
-    protected function getMockDataManager(): MockObject|DataManager
287
+    protected function getMockDataManager(): MockObject | DataManager
288 288
     {
289 289
         $stub = $this->getMockBuilder(DataManager::class)
290 290
             ->disableOriginalConstructor()
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         return $markupEngine;
328 328
     }
329 329
 
330
-    protected function getMockRedirectMapper(): RedirectMapper|MockObject
330
+    protected function getMockRedirectMapper(): RedirectMapper | MockObject
331 331
     {
332 332
         $stub = $this->getMockBuilder(RedirectMapper::class)
333 333
             ->getMock()
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     /**
342 342
      * Get a mock EventDispatcher.
343 343
      */
344
-    protected function getMockEventDispatcher(): MockObject|EventDispatcherInterface
344
+    protected function getMockEventDispatcher(): MockObject | EventDispatcherInterface
345 345
     {
346 346
         return $this->getMockBuilder(EventDispatcherInterface::class)->getMock();
347 347
     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     /**
350 350
      * Get a mock logger.
351 351
      */
352
-    protected function getMockLogger(): MockObject|LoggerInterface
352
+    protected function getMockLogger(): MockObject | LoggerInterface
353 353
     {
354 354
         return $this->getMockBuilder(LoggerInterface::class)->getMock();
355 355
     }
Please login to merge, or discard this patch.
src/Compiler.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      *
192 192
      * @since 0.1.1
193 193
      */
194
-    public function compilePageView(DynamicPageView|RepeaterPageView|StaticPageView &$pageView): void
194
+    public function compilePageView(DynamicPageView | RepeaterPageView | StaticPageView & $pageView): void
195 195
     {
196 196
         Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
197 197
         $this->logger->debug('Compiling {type} PageView: {pageview}', [
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      *
238 238
      * @throws TemplateErrorInterface
239 239
      */
240
-    private function compileStaticPageView(StaticPageView &$pageView): void
240
+    private function compileStaticPageView(StaticPageView & $pageView): void
241 241
     {
242 242
         $this->writeToFilesystem(
243 243
             $pageView->getTargetFile(),
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      *
254 254
      * @throws TemplateErrorInterface
255 255
      */
256
-    private function compileDynamicPageView(DynamicPageView &$pageView): void
256
+    private function compileDynamicPageView(DynamicPageView & $pageView): void
257 257
     {
258 258
         $contentItems = $pageView->getCollectableItems();
259 259
         $template = $this->createTwigTemplate($pageView);
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      *
285 285
      * @throws TemplateErrorInterface
286 286
      */
287
-    private function compileRepeaterPageView(RepeaterPageView &$pageView): void
287
+    private function compileRepeaterPageView(RepeaterPageView & $pageView): void
288 288
     {
289 289
         $template = $this->createTwigTemplate($pageView);
290 290
         $permalinks = $pageView->getRepeaterPermalinks();
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
      *
326 326
      * @since 0.1.1
327 327
      */
328
-    private function compileStandardRedirects(PermalinkDocument &$pageView): void
328
+    private function compileStandardRedirects(PermalinkDocument & $pageView): void
329 329
     {
330 330
         $redirects = $pageView->getRedirects();
331 331
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
      *
357 357
      * @since 0.1.1
358 358
      */
359
-    private function compileExpandedRedirects(RepeaterPageView &$pageView): void
359
+    private function compileExpandedRedirects(RepeaterPageView & $pageView): void
360 360
     {
361 361
         $permalinks = $pageView->getRepeaterPermalinks();
362 362
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      *
396 396
      * @since  0.1.1
397 397
      */
398
-    private function buildRepeaterPageViewHTML(TemplateInterface &$template, RepeaterPageView &$pageView, ExpandedValue &$expandedValue): string
398
+    private function buildRepeaterPageViewHTML(TemplateInterface & $template, RepeaterPageView & $pageView, ExpandedValue & $expandedValue): string
399 399
     {
400 400
         $defaultContext = [
401 401
             'this' => $pageView->createJail(),
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
      *
426 426
      * @since  0.1.1
427 427
      */
428
-    private function buildDynamicPageViewHTML(TemplateInterface &$template, CollectableItem|TemplateReadyDocument &$twigItem): string
428
+    private function buildDynamicPageViewHTML(TemplateInterface & $template, CollectableItem | TemplateReadyDocument & $twigItem): string
429 429
     {
430 430
         $defaultContext = [
431 431
             'this' => $twigItem->createJail(),
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
      *
453 453
      * @throws TemplateErrorInterface
454 454
      */
455
-    private function buildStaticPageViewHTML(StaticPageView &$pageView): string
455
+    private function buildStaticPageViewHTML(StaticPageView & $pageView): string
456 456
     {
457 457
         $defaultContext = [
458 458
             'this' => $pageView->createJail(),
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
      *
481 481
      * @throws TemplateErrorInterface
482 482
      */
483
-    private function createTwigTemplate(BasePageView &$pageView): TemplateInterface
483
+    private function createTwigTemplate(BasePageView & $pageView): TemplateInterface
484 484
     {
485 485
         try {
486 486
             $template = $this->templateBridge->createTemplate($pageView->getContent());
Please login to merge, or discard this patch.
src/Server/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
     /**
184 184
      * Return the appropriate action based on a PageView's type.
185 185
      */
186
-    private function createAction(BasePageView|DynamicPageView|RepeaterPageView|StaticPageView $pageView, Compiler $compiler): Closure
186
+    private function createAction(BasePageView | DynamicPageView | RepeaterPageView | StaticPageView $pageView, Compiler $compiler): Closure
187 187
     {
188 188
         return match ($pageView->getType()) {
189 189
             BasePageView::STATIC_TYPE => $this->staticPageViewAction($pageView, $compiler),
Please login to merge, or discard this patch.
src/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
         return __::get($this->configuration, 'twig.autoescape');
172 172
     }
173 173
 
174
-    public function getRedirectTemplate(): false|string
174
+    public function getRedirectTemplate(): false | string
175 175
     {
176 176
         return __::get($this->configuration, 'templates.redirect');
177 177
     }
Please login to merge, or discard this patch.
src/Utilities/HtmlUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 abstract class HtmlUtils
15 15
 {
16
-    public static function htmlXPath(DOMDocument &$DOMDocument, $html, $xpathQuery)
16
+    public static function htmlXPath(DOMDocument & $DOMDocument, $html, $xpathQuery)
17 17
     {
18 18
         $html = self::normalizeHTML($html);
19 19
 
Please login to merge, or discard this patch.
src/Logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
      * @param int          $options  A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered
109 109
      *                               the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
110 110
      */
111
-    public function writeln(string|array $messages, $options = 0)
111
+    public function writeln(string | array $messages, $options = 0)
112 112
     {
113 113
         $this->output->writeln($messages, $options);
114 114
     }
Please login to merge, or discard this patch.
src/Event/PageViewAdded.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
 
26 26
     private $pageView;
27 27
 
28
-    public function __construct(BasePageView &$pageView)
28
+    public function __construct(BasePageView & $pageView)
29 29
     {
30 30
         $this->pageView = &$pageView;
31 31
     }
32 32
 
33
-    public function &getPageView(): BasePageView|DynamicPageView|RepeaterPageView|StaticPageView
33
+    public function &getPageView(): BasePageView | DynamicPageView | RepeaterPageView | StaticPageView
34 34
     {
35 35
         return $this->pageView;
36 36
     }
Please login to merge, or discard this patch.
src/Templating/TemplateInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @return false|self returns false when template is not extending anything
24 24
      */
25
-    public function getParentTemplate(): false|self;
25
+    public function getParentTemplate(): false | self;
26 26
 
27 27
     /**
28 28
      * Render the template with the given context.
Please login to merge, or discard this patch.
src/FrontMatter/ExpandedValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      *
87 87
      * @param string $variableName
88 88
      */
89
-    public function setIterator($variableName, int|string $variableValue): void
89
+    public function setIterator($variableName, int | string $variableValue): void
90 90
     {
91 91
         $this->iterators[$variableName] = $variableValue;
92 92
     }
Please login to merge, or discard this patch.