@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * @param PageView[][] $pageViews |
|
91 | + * @param Document\TrackableDocument[] $pageViews |
|
92 | 92 | * @param PageView[] $pageViewsFlattened |
93 | 93 | */ |
94 | 94 | public function setPageViews(array &$pageViews, array &$pageViewsFlattened) |
@@ -109,6 +109,9 @@ discard block |
||
109 | 109 | // Twig parent templates |
110 | 110 | /// |
111 | 111 | |
112 | + /** |
|
113 | + * @param string $filePath |
|
114 | + */ |
|
112 | 115 | public function isImportDependency($filePath) |
113 | 116 | { |
114 | 117 | return isset($this->importDependencies[$filePath]); |
@@ -161,6 +164,9 @@ discard block |
||
161 | 164 | } |
162 | 165 | } |
163 | 166 | |
167 | + /** |
|
168 | + * @param string $filePath |
|
169 | + */ |
|
164 | 170 | public function compileImportDependencies($filePath) |
165 | 171 | { |
166 | 172 | foreach ($this->importDependencies[$filePath] as &$dependent) |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | * |
195 | 195 | * @since 0.1.1 |
196 | 196 | */ |
197 | - public function compilePageView(PageView &$pageView) |
|
197 | + public function compilePageView(PageView & $pageView) |
|
198 | 198 | { |
199 | 199 | $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath()); |
200 | 200 | $this->output->debug('Compiling {type} PageView: {pageview}', array( |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * |
242 | 242 | * @since 0.1.1 |
243 | 243 | */ |
244 | - private function compileStaticPageView(PageView &$pageView) |
|
244 | + private function compileStaticPageView(PageView & $pageView) |
|
245 | 245 | { |
246 | 246 | $targetFile = $pageView->getTargetFile(); |
247 | 247 | $output = $this->renderStaticPageView($pageView); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * |
258 | 258 | * @since 0.1.1 |
259 | 259 | */ |
260 | - private function compileDynamicPageViews(DynamicPageView &$pageView) |
|
260 | + private function compileDynamicPageViews(DynamicPageView & $pageView) |
|
261 | 261 | { |
262 | 262 | $contentItems = $pageView->getRepeatableItems(); |
263 | 263 | $template = $this->createTwigTemplate($pageView); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @since 0.1.1 |
290 | 290 | */ |
291 | - private function compileRepeaterPageViews(RepeaterPageView &$pageView) |
|
291 | + private function compileRepeaterPageViews(RepeaterPageView & $pageView) |
|
292 | 292 | { |
293 | 293 | $pageView->rewindPermalink(); |
294 | 294 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * |
314 | 314 | * @param ContentItem $contentItem |
315 | 315 | */ |
316 | - public function compileContentItem(ContentItem &$contentItem) |
|
316 | + public function compileContentItem(ContentItem & $contentItem) |
|
317 | 317 | { |
318 | 318 | $pageView = &$contentItem->getPageView(); |
319 | 319 | $template = $this->createTwigTemplate($pageView); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * |
340 | 340 | * @since 0.1.1 |
341 | 341 | */ |
342 | - private function compileStandardRedirects(PageView &$pageView) |
|
342 | + private function compileStandardRedirects(PageView & $pageView) |
|
343 | 343 | { |
344 | 344 | $redirects = $pageView->getRedirects(); |
345 | 345 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | * |
363 | 363 | * @since 0.1.1 |
364 | 364 | */ |
365 | - private function compileExpandedRedirects(RepeaterPageView &$pageView) |
|
365 | + private function compileExpandedRedirects(RepeaterPageView & $pageView) |
|
366 | 366 | { |
367 | 367 | $permalinks = $pageView->getRepeaterPermalinks(); |
368 | 368 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * |
401 | 401 | * @return string |
402 | 402 | */ |
403 | - private function renderRepeaterPageView(Twig_Template &$template, RepeaterPageView &$pageView, ExpandedValue &$expandedValue) |
|
403 | + private function renderRepeaterPageView(Twig_Template & $template, RepeaterPageView & $pageView, ExpandedValue & $expandedValue) |
|
404 | 404 | { |
405 | 405 | $pageView->setFrontMatter(array( |
406 | 406 | 'permalink' => $expandedValue->getEvaluated(), |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | * @since 0.1.1 |
424 | 424 | * |
425 | 425 | */ |
426 | - private function renderDynamicPageView(Twig_Template &$template, TwigDocument &$twigItem) |
|
426 | + private function renderDynamicPageView(Twig_Template & $template, TwigDocument & $twigItem) |
|
427 | 427 | { |
428 | 428 | return $template |
429 | 429 | ->render(array( |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * |
445 | 445 | * @return string |
446 | 446 | */ |
447 | - private function renderStaticPageView(PageView &$pageView) |
|
447 | + private function renderStaticPageView(PageView & $pageView) |
|
448 | 448 | { |
449 | 449 | return $this |
450 | 450 | ->createTwigTemplate($pageView) |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | * |
467 | 467 | * @return Twig_Template |
468 | 468 | */ |
469 | - private function createTwigTemplate(PageView &$pageView) |
|
469 | + private function createTwigTemplate(PageView & $pageView) |
|
470 | 470 | { |
471 | 471 | try |
472 | 472 | { |
@@ -11,6 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | /** |
13 | 13 | * @param string $filePath |
14 | + * @return void |
|
14 | 15 | */ |
15 | 16 | public function __construct($filePath); |
16 | 17 |
@@ -68,6 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | /** |
70 | 70 | * {@inheritdoc} |
71 | + * @param string $filePath |
|
71 | 72 | */ |
72 | 73 | public function refreshItem($filePath) |
73 | 74 | { |
@@ -86,6 +87,7 @@ discard block |
||
86 | 87 | |
87 | 88 | /** |
88 | 89 | * {@inheritdoc} |
90 | + * @param string $filePath |
|
89 | 91 | */ |
90 | 92 | public function createNewItem($filePath) |
91 | 93 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Get all of the ContentItems grouped by Collection name. |
30 | 30 | * |
31 | - * @return ContentItem[][] |
|
31 | + * @return \allejo\stakx\Document\TrackableDocument[] |
|
32 | 32 | */ |
33 | 33 | public function &getCollections() |
34 | 34 | { |
@@ -109,6 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | /** |
111 | 111 | * {@inheritdoc} |
112 | + * @param string $filePath |
|
112 | 113 | */ |
113 | 114 | public function createNewItem($filePath) |
114 | 115 | { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Give this manager the collections we'll be using for dynamic PageViews. |
66 | 66 | * |
67 | - * @param ContentItem[][] $collections |
|
67 | + * @param \allejo\stakx\Document\TrackableDocument[] $collections |
|
68 | 68 | * |
69 | 69 | * @since 0.1.0 |
70 | 70 | */ |
@@ -73,6 +73,9 @@ discard block |
||
73 | 73 | $this->collections = &$collections; |
74 | 74 | } |
75 | 75 | |
76 | + /** |
|
77 | + * @param \allejo\stakx\Document\TrackableDocument[] $datasets |
|
78 | + */ |
|
76 | 79 | public function setDatasets($datasets) |
77 | 80 | { |
78 | 81 | $this->datasets = $datasets; |
@@ -86,7 +89,7 @@ discard block |
||
86 | 89 | * @deprecated Been replaced by getPageViewsFlattened() |
87 | 90 | * @since 0.1.0 |
88 | 91 | * |
89 | - * @return PageView[][] |
|
92 | + * @return \allejo\stakx\Document\TrackableDocument[] |
|
90 | 93 | */ |
91 | 94 | public function getAllPageViews() |
92 | 95 | { |
@@ -98,7 +101,7 @@ discard block |
||
98 | 101 | * |
99 | 102 | * @since 0.1.1 |
100 | 103 | * |
101 | - * @return PageView[][] |
|
104 | + * @return \allejo\stakx\Document\TrackableDocument[] |
|
102 | 105 | */ |
103 | 106 | public function &getPageViews() |
104 | 107 | { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * @param SplFileInfo|string $filePath |
|
91 | + * @param string $filePath |
|
92 | 92 | * |
93 | 93 | * @return mixed|null |
94 | 94 | */ |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | /** |
136 | 136 | * Update the contents of a specified file. |
137 | 137 | * |
138 | - * @param SplFileInfo|string $filePath The relative path of the file |
|
138 | + * @param string $filePath The relative path of the file |
|
139 | 139 | * |
140 | 140 | * @return PageView |
141 | 141 | */ |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | /** |
287 | 287 | * Return an array of JailedDocuments created from the tracked items |
288 | 288 | * |
289 | - * @param array $elements |
|
289 | + * @param TrackableDocument[] $elements |
|
290 | 290 | * |
291 | 291 | * @return JailedDocument[]|JailedDocument[][] |
292 | 292 | */ |
@@ -148,12 +148,12 @@ discard block |
||
148 | 148 | // Internal object handling |
149 | 149 | /// |
150 | 150 | |
151 | - protected function addFileToTracker(SplFileInfo &$file) |
|
151 | + protected function addFileToTracker(SplFileInfo & $file) |
|
152 | 152 | { |
153 | 153 | $this->trackedItemsFlattened[$file->getRelativePathname()] = &$file; |
154 | 154 | } |
155 | 155 | |
156 | - protected function delFileFromTracker(SplFileInfo &$file) |
|
156 | + protected function delFileFromTracker(SplFileInfo & $file) |
|
157 | 157 | { |
158 | 158 | unset($this->trackedItemsFlattened[$file->getRelativePathname()]); |
159 | 159 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @param TrackableDocument $trackedItem |
165 | 165 | * @param string|null $namespace |
166 | 166 | */ |
167 | - protected function addObjectToTracker(TrackableDocument &$trackedItem, $namespace = null) |
|
167 | + protected function addObjectToTracker(TrackableDocument & $trackedItem, $namespace = null) |
|
168 | 168 | { |
169 | 169 | if ($namespace == null) |
170 | 170 | { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * @param TrackableDocument $trackedItem |
185 | 185 | * @param string|null $namespace |
186 | 186 | */ |
187 | - protected function delObjectFromTracker(TrackableDocument &$trackedItem, $namespace = null) |
|
187 | + protected function delObjectFromTracker(TrackableDocument & $trackedItem, $namespace = null) |
|
188 | 188 | { |
189 | 189 | if ($namespace == null) |
190 | 190 | { |
@@ -300,7 +300,9 @@ |
||
300 | 300 | */ |
301 | 301 | foreach ($elements as &$item) |
302 | 302 | { |
303 | - if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft()) { continue; } |
|
303 | + if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft()) |
|
304 | + { |
|
305 | +continue; } |
|
304 | 306 | |
305 | 307 | if (empty($item->getNamespace())) |
306 | 308 | { |
@@ -32,6 +32,9 @@ |
||
32 | 32 | )); |
33 | 33 | } |
34 | 34 | |
35 | + /** |
|
36 | + * @param boolean $absolute |
|
37 | + */ |
|
35 | 38 | private function getUrl($absolute) |
36 | 39 | { |
37 | 40 | $url = '/'; |
@@ -95,6 +95,6 @@ |
||
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
98 | - return preg_replace('#(?<!:)/+#','/', join('/', $paths)); |
|
98 | + return preg_replace('#(?<!:)/+#', '/', join('/', $paths)); |
|
99 | 99 | } |
100 | 100 | } |
@@ -46,5 +46,5 @@ |
||
46 | 46 | * |
47 | 47 | * @return void |
48 | 48 | */ |
49 | - public function setParentPageView(PageView &$pageView); |
|
49 | + public function setParentPageView(PageView & $pageView); |
|
50 | 50 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | /** |
103 | 103 | * {@inheritdoc} |
104 | 104 | */ |
105 | - public function setParentPageView(PageView &$pageView) |
|
105 | + public function setParentPageView(PageView & $pageView) |
|
106 | 106 | { |
107 | 107 | $this->pageView = &$pageView; |
108 | 108 | } |