@@ -226,7 +226,7 @@ |
||
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | 228 | * Apply multiple functions to variable. |
| 229 | - * @param mixed $var |
|
| 229 | + * @param string $var |
|
| 230 | 230 | * @param string $functions |
| 231 | 231 | * @return mixed |
| 232 | 232 | */ |
@@ -178,6 +178,7 @@ discard block |
||
| 178 | 178 | /** |
| 179 | 179 | * Get all preassigned template data. |
| 180 | 180 | * @param null|string $template; |
| 181 | + * @param string $template |
|
| 181 | 182 | * @return array |
| 182 | 183 | */ |
| 183 | 184 | public function getData($template = null) |
@@ -189,6 +190,7 @@ discard block |
||
| 189 | 190 | * Register a new template function. |
| 190 | 191 | * @param string $name; |
| 191 | 192 | * @param callback $callback; |
| 193 | + * @param string $name |
|
| 192 | 194 | * @return Engine |
| 193 | 195 | */ |
| 194 | 196 | public function registerFunction($name, $callback) |
@@ -258,7 +260,7 @@ discard block |
||
| 258 | 260 | |
| 259 | 261 | /** |
| 260 | 262 | * Get a template path. |
| 261 | - * @param string|Name $name |
|
| 263 | + * @param Name $name |
|
| 262 | 264 | * @return string |
| 263 | 265 | */ |
| 264 | 266 | public function path($name) |
@@ -270,7 +272,7 @@ discard block |
||
| 270 | 272 | |
| 271 | 273 | /** |
| 272 | 274 | * Check if a template exists. |
| 273 | - * @param string|Name $name |
|
| 275 | + * @param Name $name |
|
| 274 | 276 | * @return boolean |
| 275 | 277 | */ |
| 276 | 278 | public function exists($name) |
@@ -46,6 +46,9 @@ discard block |
||
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @return string |
|
| 51 | + */ |
|
| 49 | 52 | public function resolvePath(Name $name) |
| 50 | 53 | { |
| 51 | 54 | $namespace = $this->normalizeNamespace($name->getNamespace()); |
@@ -128,6 +131,9 @@ discard block |
||
| 128 | 131 | } |
| 129 | 132 | } |
| 130 | 133 | |
| 134 | + /** |
|
| 135 | + * @param string $path |
|
| 136 | + */ |
|
| 131 | 137 | protected function normalizePath($path, Name $name): string |
| 132 | 138 | { |
| 133 | 139 | if (!is_null($name->getEngine()->getFileExtension())) { |