@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | $app['intaro_pinba.script_name_configure.enable'] = true; |
37 | 37 | |
38 | 38 | |
39 | - $app['intaro_pinba.script_name_configure.listener'] = function () use ($app) { |
|
39 | + $app['intaro_pinba.script_name_configure.listener'] = function() use ($app) { |
|
40 | 40 | return new $app['intaro_pinba.script_name_configure.class']; |
41 | 41 | }; |
42 | 42 | |
43 | - $app['intaro_pinba.stopwatch'] = function () use ($app) { |
|
43 | + $app['intaro_pinba.stopwatch'] = function() use ($app) { |
|
44 | 44 | return new $app['intaro_pinba.stopwatch.class']; |
45 | 45 | }; |
46 | 46 | |
47 | - $app['doctrine.dbal.logger'] = function () use ($app) { |
|
47 | + $app['doctrine.dbal.logger'] = function() use ($app) { |
|
48 | 48 | /** |
49 | 49 | * @see \Intaro\PinbaBundle\Logger\DbalLogger |
50 | 50 | */ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | return new $className($app["intaro_pinba.stopwatch"], $host); |
54 | 54 | }; |
55 | 55 | |
56 | - $app['dbs.config'] = function ($app) { |
|
56 | + $app['dbs.config'] = function($app) { |
|
57 | 57 | $app['dbs.options.initializer'](); |
58 | 58 | |
59 | 59 | $configs = new Container(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | return $configs; |
69 | 69 | }; |
70 | 70 | |
71 | - $app['twig.environment_factory'] = $app->protect(function ($app) { |
|
71 | + $app['twig.environment_factory'] = $app->protect(function($app) { |
|
72 | 72 | $className = $app['intaro_pinba.templating.engine.twig.class']; |
73 | 73 | return new $className($app['twig.loader'], $app['twig.options']); |
74 | 74 | }); |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function boot(Application $app) |
86 | 86 | { |
87 | - $app['twig'] = $app->extend('twig', function (\Twig_Environment $twig) use ($app) { |
|
88 | - if($twig instanceof TimedTwigEnvironment) { |
|
87 | + $app['twig'] = $app->extend('twig', function(\Twig_Environment $twig) use ($app) { |
|
88 | + if ($twig instanceof TimedTwigEnvironment) { |
|
89 | 89 | $twig |
90 | - ->setStopwatch( $app['intaro_pinba.stopwatch']) |
|
90 | + ->setStopwatch($app['intaro_pinba.stopwatch']) |
|
91 | 91 | ->setServerName($app['intaro_pinba.server.name']) |
92 | 92 | ; |
93 | 93 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | use Intaro\PinbaBundle\Stopwatch\Stopwatch; |
11 | 11 | |
12 | -class TimedTwigEnvironment extends \Twig_Environment{ |
|
12 | +class TimedTwigEnvironment extends \Twig_Environment { |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @var Stopwatch |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function render($name, array $context = array()) |
57 | 57 | { |
58 | - if(null === $this->stopwatch) { |
|
58 | + if (null === $this->stopwatch) { |
|
59 | 59 | return parent::render($name, $context); |
60 | 60 | } |
61 | 61 | $e = $this->stopwatch->start(array( |
62 | 62 | 'server' => $this->serverName, |
63 | 63 | 'group' => 'twig::render', |
64 | - 'twig_template' => (string)$name, |
|
64 | + 'twig_template' => (string) $name, |
|
65 | 65 | )); |
66 | 66 | |
67 | 67 | $ret = parent::render($name, $context); |