@@ -40,4 +40,4 @@ |
||
| 40 | 40 | 'hostname' => 'emulate hostname', |
| 41 | 41 | "server_name" => 'emulate server name', |
| 42 | 42 | ); |
| 43 | - } |
|
| 44 | 43 | \ No newline at end of file |
| 44 | + } |
|
| 45 | 45 | \ No newline at end of file |
@@ -15,26 +15,26 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | global $app; |
| 17 | 17 | static $logger = null; |
| 18 | - if(is_null($logger)) { |
|
| 18 | + if (is_null($logger)) { |
|
| 19 | 19 | $logger = $app['pinba_logger']; |
| 20 | 20 | } |
| 21 | 21 | return $logger; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -function pinba_script_name_set ($name){ |
|
| 24 | +function pinba_script_name_set($name) { |
|
| 25 | 25 | get_pinba_logger()->debug(__FUNCTION__, func_get_args()); |
| 26 | 26 | } |
| 27 | -function pinba_timer_start ($tags){ |
|
| 27 | +function pinba_timer_start($tags) { |
|
| 28 | 28 | get_pinba_logger()->debug(__FUNCTION__, func_get_args()); |
| 29 | - return rand(100,999); |
|
| 29 | + return rand(100, 999); |
|
| 30 | 30 | } |
| 31 | -function pinba_timer_stop ($tags){ |
|
| 31 | +function pinba_timer_stop($tags) { |
|
| 32 | 32 | get_pinba_logger()->debug(__FUNCTION__, func_get_args()); |
| 33 | 33 | } |
| 34 | -function pinba_timer_add ($tags, $time){ |
|
| 34 | +function pinba_timer_add($tags, $time) { |
|
| 35 | 35 | get_pinba_logger()->debug(__FUNCTION__, func_get_args()); |
| 36 | 36 | } |
| 37 | -function pinba_get_info (){ |
|
| 37 | +function pinba_get_info() { |
|
| 38 | 38 | get_pinba_logger()->debug(__FUNCTION__); |
| 39 | 39 | return array( |
| 40 | 40 | 'hostname' => 'emulate hostname', |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use Intaro\PinbaBundle\Stopwatch\Stopwatch; |
| 11 | 11 | use Intaro\PinbaBundle\Stopwatch\StopwatchEvent; |
| 12 | 12 | |
| 13 | -class Filesystem extends FilesystemCache{ |
|
| 13 | +class Filesystem extends FilesystemCache { |
|
| 14 | 14 | /** |
| 15 | 15 | * @var Stopwatch |
| 16 | 16 | */ |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | return null; |
| 44 | 44 | } |
| 45 | 45 | $tags = $this->stopwatchAdditionalTags; |
| 46 | - $tags['group'] = 'filesystem::' . $methodName; |
|
| 46 | + $tags['group'] = 'filesystem::'.$methodName; |
|
| 47 | 47 | |
| 48 | 48 | return $this->stopwatch->start($tags); |
| 49 | 49 | } |
@@ -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 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | |
| 90 | 90 | public function stop() |
| 91 | 91 | { |
| 92 | - $this->storage['tags'] = $this->tags; |
|
| 92 | + $this->storage['tags'] = $this->tags; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | } |
@@ -21,9 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | $storage = new \ArrayObject(); |
| 23 | 23 | |
| 24 | - $app = new ApplicationEmulator(); |
|
| 24 | + $app = new ApplicationEmulator(); |
|
| 25 | 25 | $app |
| 26 | - ->register(new TwigServiceProvider(),array( |
|
| 26 | + ->register(new TwigServiceProvider(), array( |
|
| 27 | 27 | 'twig.templates' => array('hello' => 'Hello {{ name }}!'), |
| 28 | 28 | )) |
| 29 | 29 | ->register(new SilexPinbaProvider()); |
@@ -35,15 +35,15 @@ discard block |
||
| 35 | 35 | $app['intaro_pinba.script_name_configure.enable'] = true; |
| 36 | 36 | |
| 37 | 37 | |
| 38 | - $app['intaro_pinba.script_name_configure.listener'] = function () use ($app) { |
|
| 38 | + $app['intaro_pinba.script_name_configure.listener'] = function() use ($app) { |
|
| 39 | 39 | return new $app['intaro_pinba.script_name_configure.class']; |
| 40 | 40 | }; |
| 41 | 41 | |
| 42 | - $app['intaro_pinba.stopwatch'] = function () use ($app) { |
|
| 42 | + $app['intaro_pinba.stopwatch'] = function() use ($app) { |
|
| 43 | 43 | return new $app['intaro_pinba.stopwatch.class']; |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | - $app['doctrine.dbal.logger'] = function () use ($app) { |
|
| 46 | + $app['doctrine.dbal.logger'] = function() use ($app) { |
|
| 47 | 47 | /** |
| 48 | 48 | * @see \Intaro\PinbaBundle\Logger\DbalLogger |
| 49 | 49 | */ |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | return new $className($app["intaro_pinba.stopwatch"], $host); |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | - $app['dbs.config'] = function ($app) { |
|
| 55 | + $app['dbs.config'] = function($app) { |
|
| 56 | 56 | $app['dbs.options.initializer'](); |
| 57 | 57 | |
| 58 | 58 | $configs = new Container(); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function boot(Application $app) |
| 80 | 80 | { |
| 81 | - $app['twig'] = $app->extend('twig', function (\Twig_Environment $twig) use ($app) { |
|
| 81 | + $app['twig'] = $app->extend('twig', function(\Twig_Environment $twig) use ($app) { |
|
| 82 | 82 | /** |
| 83 | 83 | * @see \Intaro\PinbaBundle\Twig\TimedTwigEngine |
| 84 | 84 | */ |