@@ -26,7 +26,6 @@ |
||
| 26 | 26 | * |
| 27 | 27 | * @param HandlebarsEnvironment $handlebars A HandlebarsEnvironment instance |
| 28 | 28 | * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance |
| 29 | - * @param FileLocatorInterface $locator A FileLocatorInterface instance |
|
| 30 | 29 | */ |
| 31 | 30 | public function __construct(HandlebarsEnvironment $handlebars, TemplateNameParserInterface $parser) |
| 32 | 31 | { |
@@ -72,6 +72,9 @@ |
||
| 72 | 72 | $this->profiler = $profiler; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $name |
|
| 77 | + */ |
|
| 75 | 78 | public function compile($name) |
| 76 | 79 | { |
| 77 | 80 | $source = $this->loader->getSource($name); |
@@ -26,7 +26,6 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * Constructor. |
| 28 | 28 | * |
| 29 | - * @param string|array $paths A path or an array of paths where to look for templates |
|
| 30 | 29 | */ |
| 31 | 30 | public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) |
| 32 | 31 | { |
@@ -133,6 +132,7 @@ discard block |
||
| 133 | 132 | |
| 134 | 133 | /** |
| 135 | 134 | * {@inheritdoc} |
| 135 | + * @return string |
|
| 136 | 136 | */ |
| 137 | 137 | public function getCacheKey($name) |
| 138 | 138 | { |
@@ -141,6 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * {@inheritdoc} |
| 144 | + * @param string $template |
|
| 144 | 145 | */ |
| 145 | 146 | public function exists($template) |
| 146 | 147 | { |
@@ -157,6 +158,9 @@ discard block |
||
| 157 | 158 | } |
| 158 | 159 | } |
| 159 | 160 | |
| 161 | + /** |
|
| 162 | + * @param string $name |
|
| 163 | + */ |
|
| 160 | 164 | protected function parseName($name, $default = self::MAIN_NAMESPACE) |
| 161 | 165 | { |
| 162 | 166 | if (isset($name[0]) && '@' == $name[0]) { |
@@ -178,6 +182,9 @@ discard block |
||
| 178 | 182 | return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name)); |
| 179 | 183 | } |
| 180 | 184 | |
| 185 | + /** |
|
| 186 | + * @return string |
|
| 187 | + */ |
|
| 181 | 188 | protected function findTemplate($template, $throw = true) |
| 182 | 189 | { |
| 183 | 190 | $name = $this->normalizeName($template); |