@@ -54,7 +54,7 @@ |
||
54 | 54 | private static function flatten(array $array) |
55 | 55 | { |
56 | 56 | $return = array(); |
57 | - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); |
|
57 | + array_walk_recursive($array, function ($a) use (&$return) { $return[] = $a; }); |
|
58 | 58 | return $return; |
59 | 59 | } |
60 | 60 | } |
61 | 61 | \ No newline at end of file |
@@ -54,7 +54,9 @@ |
||
54 | 54 | private static function flatten(array $array) |
55 | 55 | { |
56 | 56 | $return = array(); |
57 | - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); |
|
57 | + array_walk_recursive($array, function($a) use (&$return) |
|
58 | + { |
|
59 | +$return[] = $a; }); |
|
58 | 60 | return $return; |
59 | 61 | } |
60 | 62 | } |
61 | 63 | \ No newline at end of file |
@@ -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 | { |
@@ -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 | } |
@@ -55,14 +55,20 @@ |
||
55 | 55 | |
56 | 56 | $headingID = $heading->attributes->getNamedItem('id'); |
57 | 57 | |
58 | - if ($curr > $last) // If the current level is greater than the last level indent one level |
|
58 | + if ($curr > $last) |
|
59 | + { |
|
60 | + // If the current level is greater than the last level indent one level |
|
59 | 61 | { |
60 | 62 | $toc .= '<ul>'; |
61 | 63 | } |
62 | - elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount. |
|
64 | + } |
|
65 | + elseif ($curr < $last) |
|
66 | + { |
|
67 | + // If the current level is less than the last level go up appropriate amount. |
|
63 | 68 | { |
64 | 69 | $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>'; |
65 | 70 | } |
71 | + } |
|
66 | 72 | else // If the current level is equal to the last. |
67 | 73 | { |
68 | 74 | $toc .= '</li>'; |
@@ -14,6 +14,9 @@ |
||
14 | 14 | { |
15 | 15 | private $container; |
16 | 16 | |
17 | + /** |
|
18 | + * @return \Symfony\Component\DependencyInjection\ContainerInterface |
|
19 | + */ |
|
17 | 20 | public function getContainer() |
18 | 21 | { |
19 | 22 | if ($this->container === null) |
@@ -110,6 +110,9 @@ discard block |
||
110 | 110 | // Twig parent templates |
111 | 111 | /// |
112 | 112 | |
113 | + /** |
|
114 | + * @param string $filePath |
|
115 | + */ |
|
113 | 116 | public function isImportDependency($filePath) |
114 | 117 | { |
115 | 118 | return isset($this->importDependencies[$filePath]); |
@@ -162,6 +165,9 @@ discard block |
||
162 | 165 | } |
163 | 166 | } |
164 | 167 | |
168 | + /** |
|
169 | + * @param string $filePath |
|
170 | + */ |
|
165 | 171 | public function compileImportDependencies($filePath) |
166 | 172 | { |
167 | 173 | foreach ($this->importDependencies[$filePath] as &$dependent) |
@@ -333,7 +333,6 @@ |
||
333 | 333 | * Write the compiled output for a repeater PageView. |
334 | 334 | * |
335 | 335 | * @param RepeaterPageView $pageView |
336 | - |
|
337 | 336 | * @since 0.1.1 |
338 | 337 | * |
339 | 338 | * @throws TemplateErrorInterface |
@@ -203,7 +203,8 @@ |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | if (strpos($haystack, $query, $offset) !== false) |
206 | - { // stop on first true result |
|
206 | + { |
|
207 | +// stop on first true result |
|
207 | 208 | return true; |
208 | 209 | } |
209 | 210 | } |
@@ -20,7 +20,8 @@ |
||
20 | 20 | */ |
21 | 21 | public static function array_safe_get(array $array, $key, $default = null) |
22 | 22 | { |
23 | - if (isset($array[$key])) { |
|
23 | + if (isset($array[$key])) |
|
24 | + { |
|
24 | 25 | return $array[$key]; |
25 | 26 | } |
26 | 27 |
@@ -26,6 +26,9 @@ |
||
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $extension |
|
31 | + */ |
|
29 | 32 | public function getTransformer($extension) |
30 | 33 | { |
31 | 34 | if (isset($this->transformers[$extension])) |