@@ -199,7 +199,7 @@ |
||
| 199 | 199 | if ($this->cacheDirectory) |
| 200 | 200 | { |
| 201 | 201 | $cacheOptions = [ |
| 202 | - 'cacheDir' => (string) $this->cacheDirectory->getFilesystemPath(), |
|
| 202 | + 'cacheDir' => (string)$this->cacheDirectory->getFilesystemPath(), |
|
| 203 | 203 | 'forceRefresh' => false, |
| 204 | 204 | ]; |
| 205 | 205 | } |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * |
| 221 | 221 | * @since 0.1.1 |
| 222 | 222 | */ |
| 223 | - public function compilePageView(BasePageView &$pageView) |
|
| 223 | + public function compilePageView(BasePageView & $pageView) |
|
| 224 | 224 | { |
| 225 | 225 | Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath()); |
| 226 | 226 | $this->logger->debug('Compiling {type} PageView: {pageview}', [ |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | * |
| 268 | 268 | * @throws TemplateErrorInterface |
| 269 | 269 | */ |
| 270 | - private function compileStaticPageView(StaticPageView &$pageView) |
|
| 270 | + private function compileStaticPageView(StaticPageView & $pageView) |
|
| 271 | 271 | { |
| 272 | 272 | $this->writeToFilesystem( |
| 273 | 273 | $pageView->getTargetFile(), |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | * |
| 286 | 286 | * @throws TemplateErrorInterface |
| 287 | 287 | */ |
| 288 | - private function compileDynamicPageView(DynamicPageView &$pageView) |
|
| 288 | + private function compileDynamicPageView(DynamicPageView & $pageView) |
|
| 289 | 289 | { |
| 290 | 290 | $contentItems = $pageView->getCollectableItems(); |
| 291 | 291 | $template = $this->createTwigTemplate($pageView); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | * |
| 321 | 321 | * @throws TemplateErrorInterface |
| 322 | 322 | */ |
| 323 | - private function compileRepeaterPageView(RepeaterPageView &$pageView) |
|
| 323 | + private function compileRepeaterPageView(RepeaterPageView & $pageView) |
|
| 324 | 324 | { |
| 325 | 325 | $template = $this->createTwigTemplate($pageView); |
| 326 | 326 | $permalinks = $pageView->getRepeaterPermalinks(); |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | * |
| 363 | 363 | * @since 0.1.1 |
| 364 | 364 | */ |
| 365 | - private function compileStandardRedirects(PermalinkDocument &$pageView) |
|
| 365 | + private function compileStandardRedirects(PermalinkDocument & $pageView) |
|
| 366 | 366 | { |
| 367 | 367 | $redirects = $pageView->getRedirects(); |
| 368 | 368 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | * |
| 397 | 397 | * @since 0.1.1 |
| 398 | 398 | */ |
| 399 | - private function compileExpandedRedirects(RepeaterPageView &$pageView) |
|
| 399 | + private function compileExpandedRedirects(RepeaterPageView & $pageView) |
|
| 400 | 400 | { |
| 401 | 401 | $permalinks = $pageView->getRepeaterPermalinks(); |
| 402 | 402 | |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | * |
| 447 | 447 | * @return string |
| 448 | 448 | */ |
| 449 | - private function buildRepeaterPageViewHTML(TemplateInterface &$template, RepeaterPageView &$pageView, ExpandedValue &$expandedValue) |
|
| 449 | + private function buildRepeaterPageViewHTML(TemplateInterface & $template, RepeaterPageView & $pageView, ExpandedValue & $expandedValue) |
|
| 450 | 450 | { |
| 451 | 451 | $defaultContext = [ |
| 452 | 452 | 'this' => $pageView->createJail(), |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | * |
| 481 | 481 | * @return string |
| 482 | 482 | */ |
| 483 | - private function buildDynamicPageViewHTML(TemplateInterface &$template, &$twigItem) |
|
| 483 | + private function buildDynamicPageViewHTML(TemplateInterface & $template, &$twigItem) |
|
| 484 | 484 | { |
| 485 | 485 | $defaultContext = [ |
| 486 | 486 | 'this' => $twigItem->createJail(), |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | * |
| 510 | 510 | * @return string |
| 511 | 511 | */ |
| 512 | - private function buildStaticPageViewHTML(StaticPageView &$pageView) |
|
| 512 | + private function buildStaticPageViewHTML(StaticPageView & $pageView) |
|
| 513 | 513 | { |
| 514 | 514 | $defaultContext = [ |
| 515 | 515 | 'this' => $pageView->createJail(), |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | * |
| 540 | 540 | * @return TemplateInterface |
| 541 | 541 | */ |
| 542 | - private function createTwigTemplate(BasePageView &$pageView) |
|
| 542 | + private function createTwigTemplate(BasePageView & $pageView) |
|
| 543 | 543 | { |
| 544 | 544 | try |
| 545 | 545 | { |
@@ -25,7 +25,7 @@ |
||
| 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 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | /** |
| 46 | 46 | * {@inheritdoc} |
| 47 | 47 | */ |
| 48 | - public function saveParentPageView(DynamicPageView &$pageView) |
|
| 48 | + public function saveParentPageView(DynamicPageView & $pageView) |
|
| 49 | 49 | { |
| 50 | 50 | $this->parentPageViews[] = &$pageView; |
| 51 | 51 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * Add a CollectableItem for this PageView to handle. |
| 37 | 37 | */ |
| 38 | - public function addCollectableItem(CollectableItem &$collectable) |
|
| 38 | + public function addCollectableItem(CollectableItem & $collectable) |
|
| 39 | 39 | { |
| 40 | 40 | $this->collectableItems[$collectable->getRelativeFilePath()] = &$collectable; |
| 41 | 41 | $collectable->saveParentPageView($this); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * Delete a CollectableItem from this PageView. |
| 46 | 46 | */ |
| 47 | - public function delCollectableItem(CollectableItem &$collectableItem) |
|
| 47 | + public function delCollectableItem(CollectableItem & $collectableItem) |
|
| 48 | 48 | { |
| 49 | 49 | unset($this->collectableItems[$collectableItem->getRelativeFilePath()]); |
| 50 | 50 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param array $whiteListFunctions a list of function names that can be called |
| 34 | 34 | * @param array $jailedFunctions a list of functions that will be redirected to another function |
| 35 | 35 | */ |
| 36 | - public function __construct(TemplateReadyDocument &$object, array $whiteListFunctions, array $jailedFunctions = []) |
|
| 36 | + public function __construct(TemplateReadyDocument & $object, array $whiteListFunctions, array $jailedFunctions = []) |
|
| 37 | 37 | { |
| 38 | 38 | $this->object = &$object; |
| 39 | 39 | $this->whiteListFunctions = $whiteListFunctions; |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | * |
| 46 | 46 | * @return void |
| 47 | 47 | */ |
| 48 | - public function saveParentPageView(DynamicPageView &$pageView); |
|
| 48 | + public function saveParentPageView(DynamicPageView & $pageView); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Evaluate the FrontMatter in this object by merging a custom array of data. |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - protected function addFileToTracker(File &$file) |
|
| 178 | + protected function addFileToTracker(File & $file) |
|
| 179 | 179 | { |
| 180 | 180 | $this->trackedItemsFlattened[$file->getRelativeFilePath()] = &$file; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - protected function delFileFromTracker(File &$file) |
|
| 183 | + protected function delFileFromTracker(File & $file) |
|
| 184 | 184 | { |
| 185 | 185 | unset($this->trackedItemsFlattened[$file->getRelativeFilePath()]); |
| 186 | 186 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | * @param ReadableDocument $trackedItem |
| 192 | 192 | * @param string|null $namespace |
| 193 | 193 | */ |
| 194 | - protected function addObjectToTracker(ReadableDocument &$trackedItem, $namespace = null) |
|
| 194 | + protected function addObjectToTracker(ReadableDocument & $trackedItem, $namespace = null) |
|
| 195 | 195 | { |
| 196 | 196 | if ($namespace == null) |
| 197 | 197 | { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * @param ReadableDocument $trackedItem |
| 212 | 212 | * @param string|null $namespace |
| 213 | 213 | */ |
| 214 | - protected function delObjectFromTracker(ReadableDocument &$trackedItem, $namespace = null) |
|
| 214 | + protected function delObjectFromTracker(ReadableDocument & $trackedItem, $namespace = null) |
|
| 215 | 215 | { |
| 216 | 216 | if ($namespace == null) |
| 217 | 217 | { |