Completed
Push — master ( 8affb2...358096 )
by Mikhail
06:38
created
src/SilexPinbaProvider/pinba_emulator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,4 +40,4 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,26 +15,26 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/SilexPinbaProvider/Cache/Filesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/SilexPinbaProvider/Test/PinbaTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
         $storage = new \ArrayObject();
24 24
         $app     = new ApplicationEmulator();
25 25
         $emulate = false;
26
-        if(!function_exists('pinba_script_name_set')) {
26
+        if (!function_exists('pinba_script_name_set')) {
27 27
             $emulate = true;
28
-            $app['pinba_logger'] = function () {
28
+            $app['pinba_logger'] = function() {
29 29
                 return new PinbaLogger();
30 30
             };
31 31
             require __DIR__.'/../pinba_emulator.php';
32 32
         }
33 33
         $app
34
-            ->register(new TwigServiceProvider(),array(
34
+            ->register(new TwigServiceProvider(), array(
35 35
                 'twig.templates' => array('hello' => 'Hello {{ name }}!'),
36 36
             ))
37 37
             ->register(new SilexPinbaProvider());
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $stopwatch-> setStorage($storage);
47 47
         $app->renderView('hello');
48 48
         $this->assertTrue(is_array($storage['tags']), var_export($storage, true));
49
-        if($emulate) {
49
+        if ($emulate) {
50 50
             /**
51 51
              * @var $logger PinbaLogger
52 52
              */
Please login to merge, or discard this patch.
src/SilexPinbaProvider/Twig/TimedTwigEnvironment.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/SilexPinbaProvider/SilexPinbaProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,12 +68,12 @@  discard block
 block discarded – undo
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
             $twig      = new $className($app['twig.loader'], $app['twig.options']);
74
-            if($twig instanceof TimedTwigEnvironment) {
74
+            if ($twig instanceof TimedTwigEnvironment) {
75 75
                 $twig
76
-                    ->setStopwatch( $app['intaro_pinba.stopwatch'])
76
+                    ->setStopwatch($app['intaro_pinba.stopwatch'])
77 77
                     ->setServerName($app['intaro_pinba.server.name'])
78 78
                 ;
79 79
             }
Please login to merge, or discard this patch.