@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use Silex\Application; |
13 | 13 | use Silex\ServiceProviderInterface; |
14 | 14 | |
15 | -class SilexPinbaProvider implements ServiceProviderInterface{ |
|
15 | +class SilexPinbaProvider implements ServiceProviderInterface { |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Registers services on the given app. |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return new $app['intaro_pinba.script_name_configure.class']; |
36 | 36 | }); |
37 | 37 | |
38 | - $app['intaro_pinba.stopwatch'] = $app->share(function() use ($app) { |
|
38 | + $app['intaro_pinba.stopwatch'] = $app->share(function() use ($app) { |
|
39 | 39 | return new $app['intaro_pinba.stopwatch.class']; |
40 | 40 | }); |
41 | 41 | |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | */ |
46 | 46 | $className = $app['intaro_pinba.dbal.logger.class']; |
47 | 47 | $host = isset($app["intaro_pinba.doctrine.database_host"]) ? $app["intaro_pinba.doctrine.database_host"] : $app['intaro_pinba.server.name']; |
48 | - return new $className( $app["intaro_pinba.stopwatch"], $host); |
|
48 | + return new $className($app["intaro_pinba.stopwatch"], $host); |
|
49 | 49 | }); |
50 | 50 | |
51 | - $app['dbs.config'] = $app->share(function ($app) { |
|
51 | + $app['dbs.config'] = $app->share(function($app) { |
|
52 | 52 | $app['dbs.options.initializer'](); |
53 | 53 | |
54 | 54 | $configs = new \Pimple(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | return new $className($twig, $app['intaro_pinba.stopwatch'], $app['intaro_pinba.server.name']); |
82 | 82 | }); |
83 | 83 | |
84 | - if(!function_exists('pinba_script_name_set') || PHP_SAPI === 'cli' || !$app['intaro_pinba.script_name_configure.enable']) |
|
84 | + if (!function_exists('pinba_script_name_set') || PHP_SAPI === 'cli' || !$app['intaro_pinba.script_name_configure.enable']) |
|
85 | 85 | { |
86 | 86 | return; |
87 | 87 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | use Intaro\PinbaBundle\Stopwatch\Stopwatch; |
11 | 11 | |
12 | -class TimedTwigDecorator extends \Twig_Environment{ |
|
12 | +class TimedTwigDecorator extends \Twig_Environment { |
|
13 | 13 | /** |
14 | 14 | * @var \Twig_Environment |
15 | 15 | */ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $e = $this->stopwatch->start(array( |
54 | 54 | 'server' => $this->serverName, |
55 | 55 | 'group' => 'twig::render', |
56 | - 'twig_template' => (string)$name, |
|
56 | + 'twig_template' => (string) $name, |
|
57 | 57 | )); |
58 | 58 | |
59 | 59 | $ret = $this->environment->render($name, $context); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function getEnvironment() |
71 | 71 | { |
72 | - return (method_exists($this->environment, 'getEnvironment'))? $this->environment->getEnvironment():$this->environment; |
|
72 | + return (method_exists($this->environment, 'getEnvironment')) ? $this->environment->getEnvironment() : $this->environment; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | function __call($name, $arguments) |
93 | 93 | { |
94 | - return call_user_func_array(array($this->environment,$name),$arguments); |
|
94 | + return call_user_func_array(array($this->environment, $name), $arguments); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 |