@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * Copy all of the assets |
48 | 48 | */ |
49 | - public function copyFiles() |
|
49 | + public function copyFiles () |
|
50 | 50 | { |
51 | 51 | $this->scanTrackableItems( |
52 | 52 | getcwd(), |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * {@inheritdoc} |
66 | 66 | */ |
67 | - public function isHandled($filePath) |
|
67 | + public function isHandled ($filePath) |
|
68 | 68 | { |
69 | 69 | return $this->fileExplorer->matchesPattern($filePath); |
70 | 70 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * {@inheritdoc} |
74 | 74 | */ |
75 | - public function createNewItem($filePath) |
|
75 | + public function createNewItem ($filePath) |
|
76 | 76 | { |
77 | 77 | return $this->handleTrackableItem($filePath, array( |
78 | 78 | 'prefix' => '' |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * {@inheritdoc} |
84 | 84 | */ |
85 | - protected function handleTrackableItem($file, $options = array()) |
|
85 | + protected function handleTrackableItem ($file, $options = array()) |
|
86 | 86 | { |
87 | 87 | if (is_string($file)) |
88 | 88 | { |
@@ -90,7 +90,9 @@ |
||
90 | 90 | $file = $this->fs->createSplFileInfo($file); |
91 | 91 | } |
92 | 92 | |
93 | - if (!$this->fs->exists($file)) { return; } |
|
93 | + if (!$this->fs->exists($file)) |
|
94 | + { |
|
95 | +return; } |
|
94 | 96 | |
95 | 97 | $filePath = $file->getRealPath(); |
96 | 98 | $pathToStrip = $this->fs->appendPath(getcwd(), $options['prefix']); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * {@inheritdoc} |
42 | 42 | */ |
43 | - public function __construct($filePath) |
|
43 | + public function __construct ($filePath) |
|
44 | 44 | { |
45 | 45 | parent::__construct($filePath); |
46 | 46 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return PageView[] |
88 | 88 | */ |
89 | - public function &getChildren () |
|
89 | + public function &getChildren() |
|
90 | 90 | { |
91 | 91 | return $this->children; |
92 | 92 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | self::$fileSys = new Filesystem(); |
170 | 170 | } |
171 | 171 | |
172 | - $frontMatter = array( |
|
172 | + $frontMatter = array( |
|
173 | 173 | 'permalink' => $redirectFrom, |
174 | 174 | 'redirect' => $redirectTo, |
175 | 175 | 'menu' => false |
@@ -9,7 +9,9 @@ |
||
9 | 9 | foreach ($array as $element) |
10 | 10 | { |
11 | 11 | if (is_array($element)) |
12 | - return true; |
|
12 | + { |
|
13 | + return true; |
|
14 | + } |
|
13 | 15 | } |
14 | 16 | |
15 | 17 | return false; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * |
62 | 62 | * @param array $rawFrontMatter |
63 | 63 | */ |
64 | - public function __construct(&$rawFrontMatter) |
|
64 | + public function __construct (&$rawFrontMatter) |
|
65 | 65 | { |
66 | 66 | $this->expansionUsed = false; |
67 | 67 | $this->nestingLevel = 0; |
@@ -194,7 +194,7 @@ |
||
194 | 194 | * |
195 | 195 | * @param string $frontMatterKey The current hierarchy of the Front Matter keys being used |
196 | 196 | * @param string $expandableValue The Front Matter value that will be expanded |
197 | - * @param array $arrayVariableNames The Front Matter variable names that reference arrays |
|
197 | + * @param string[] $arrayVariableNames The Front Matter variable names that reference arrays |
|
198 | 198 | * |
199 | 199 | * @return array |
200 | 200 | * |
@@ -100,7 +100,9 @@ discard block |
||
100 | 100 | */ |
101 | 101 | private function handleDateField () |
102 | 102 | { |
103 | - if (!isset($this->frontMatter['date'])) { return; } |
|
103 | + if (!isset($this->frontMatter['date'])) |
|
104 | + { |
|
105 | +return; } |
|
104 | 106 | |
105 | 107 | $date = &$this->frontMatter['date']; |
106 | 108 | $itemDate = $this->guessDateTime($date); |
@@ -258,7 +260,9 @@ discard block |
||
258 | 260 | |
259 | 261 | if (is_array($value) || is_bool($value)) |
260 | 262 | { |
261 | - if ($ignoreArrays) { continue; } |
|
263 | + if ($ignoreArrays) |
|
264 | + { |
|
265 | +continue; } |
|
262 | 266 | |
263 | 267 | throw new YamlUnsupportedVariableException("Yaml variable `$variable` for `$key` is not a supported data type."); |
264 | 268 | } |
@@ -348,6 +352,8 @@ discard block |
||
348 | 352 | { |
349 | 353 | return (new \DateTime($guess)); |
350 | 354 | } |
351 | - catch (\Exception $e) { return false; } |
|
355 | + catch (\Exception $e) |
|
356 | + { |
|
357 | +return false; } |
|
352 | 358 | } |
353 | 359 | } |
354 | 360 | \ No newline at end of file |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * {@inheritdoc} |
21 | 21 | */ |
22 | - public function __construct($filePath) |
|
22 | + public function __construct ($filePath) |
|
23 | 23 | { |
24 | 24 | parent::__construct($filePath); |
25 | 25 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * {@inheritdoc} |
21 | 21 | */ |
22 | - public function __construct($filePath) |
|
22 | + public function __construct ($filePath) |
|
23 | 23 | { |
24 | 24 | parent::__construct($filePath); |
25 | 25 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $this->highlighter = new Highlighter(); |
14 | 14 | } |
15 | 15 | |
16 | - protected function blockHeader($line) |
|
16 | + protected function blockHeader ($line) |
|
17 | 17 | { |
18 | 18 | $Block = parent::blockHeader($line); |
19 | 19 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * PageManager constructor |
60 | 60 | */ |
61 | - public function __construct() |
|
61 | + public function __construct () |
|
62 | 62 | { |
63 | 63 | parent::__construct(); |
64 | 64 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | /** |
229 | 229 | * {@inheritdoc} |
230 | 230 | */ |
231 | - public function isTracked($filePath) |
|
231 | + public function isTracked ($filePath) |
|
232 | 232 | { |
233 | 233 | return (parent::isTracked($filePath) || isset($this->twigExtendsDeps[$filePath])); |
234 | 234 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | /** |
237 | 237 | * {@inheritdoc} |
238 | 238 | */ |
239 | - public function refreshItem($filePath) |
|
239 | + public function refreshItem ($filePath) |
|
240 | 240 | { |
241 | 241 | if (parent::isTracked($filePath)) |
242 | 242 | { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | /** |
257 | 257 | * {@inheritdoc} |
258 | 258 | */ |
259 | - protected function handleTrackableItem($filePath, $options = array()) |
|
259 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
260 | 260 | { |
261 | 261 | $pageView = PageView::create($filePath); |
262 | 262 | $namespace = $pageView->getType(); |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | { |
535 | 535 | $filePath = $this->fs->getRelativePath($parent->getSourceContext()->getPath()); |
536 | 536 | |
537 | - $this->twigExtendsDeps[$filePath][(string)$pageView->getFilePath()] = &$pageView; |
|
537 | + $this->twigExtendsDeps[$filePath][(string) $pageView->getFilePath()] = &$pageView; |
|
538 | 538 | $parent = $parent->getParent(array()); |
539 | 539 | } |
540 | 540 | } |
@@ -90,6 +90,9 @@ |
||
90 | 90 | $this->targetDir = &$folder; |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param \allejo\stakx\Object\Configuration $configuration |
|
95 | + */ |
|
93 | 96 | public function configureTwig ($configuration, $options) |
94 | 97 | { |
95 | 98 | $this->twigOpts['configuration'] = $configuration; |
@@ -156,7 +156,9 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function parsePageViews ($pageViewFolders) |
158 | 158 | { |
159 | - if (empty($pageViewFolders)) { return; } |
|
159 | + if (empty($pageViewFolders)) |
|
160 | + { |
|
161 | +return; } |
|
160 | 162 | |
161 | 163 | /** |
162 | 164 | * The name of the folder where PageViews are located |
@@ -589,7 +591,9 @@ discard block |
||
589 | 591 | */ |
590 | 592 | private function trackParentTwigTemplate ($template, &$pageView) |
591 | 593 | { |
592 | - if (!$this->tracking) { return; } |
|
594 | + if (!$this->tracking) |
|
595 | + { |
|
596 | +return; } |
|
593 | 597 | |
594 | 598 | /** @var Twig_Template $parent */ |
595 | 599 | $parent = $template->getParent(array()); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * {@inheritdoc} |
105 | 105 | */ |
106 | - public function offsetExists($offset) |
|
106 | + public function offsetExists ($offset) |
|
107 | 107 | { |
108 | 108 | return $this->object->offsetExists($offset); |
109 | 109 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * {@inheritdoc} |
113 | 113 | */ |
114 | - public function offsetGet($offset) |
|
114 | + public function offsetGet ($offset) |
|
115 | 115 | { |
116 | 116 | return $this->object->offsetGet($offset); |
117 | 117 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | /** |
120 | 120 | * {@inheritdoc} |
121 | 121 | */ |
122 | - public function offsetSet($offset, $value) |
|
122 | + public function offsetSet ($offset, $value) |
|
123 | 123 | { |
124 | 124 | return $this->object->offsetSet($offset, $value); |
125 | 125 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * {@inheritdoc} |
129 | 129 | */ |
130 | - public function offsetUnset($offset) |
|
130 | + public function offsetUnset ($offset) |
|
131 | 131 | { |
132 | 132 | return $this->object->offsetUnset($offset); |
133 | 133 | } |