Commit 0cc7d382 authored by Fabien Potencier's avatar Fabien Potencier

fixed CS

parent 15b098d8
...@@ -154,17 +154,16 @@ class TwigServiceProvider implements ServiceProviderInterface ...@@ -154,17 +154,16 @@ class TwigServiceProvider implements ServiceProviderInterface
}; };
$app['twig.loader.filesystem'] = function ($app) { $app['twig.loader.filesystem'] = function ($app) {
$paths = is_array($app['twig.path']) ? $app['twig.path'] : array($app['twig.path']); $loader = new \Twig_Loader_Filesystem();
$fileSystem = new \Twig_Loader_Filesystem(); foreach (is_array($app['twig.path']) ? $app['twig.path'] : array($app['twig.path']) as $key => $val) {
foreach ($paths as $key => $val) {
if (is_string($key)) { if (is_string($key)) {
$fileSystem->addPath($key, $val); $loader->addPath($key, $val);
} else { } else {
$fileSystem->addPath($val); $loader->addPath($val);
} }
} }
return $fileSystem; return $loader;
}; };
$app['twig.loader.array'] = function ($app) { $app['twig.loader.array'] = function ($app) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment