@@ -17,11 +17,11 @@ |
||
| 17 | 17 | $app['sandstone.push.enabled'] = true; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - $app['sandstone.push.event_serializer'] = function () use ($app) { |
|
| 20 | + $app['sandstone.push.event_serializer'] = function() use ($app) { |
|
| 21 | 21 | return new EventSerializer($app['serializer']); |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | - $app['sandstone.push.event_forwarder'] = function () use ($app) { |
|
| 24 | + $app['sandstone.push.event_forwarder'] = function() use ($app) { |
|
| 25 | 25 | return new EventForwarder( |
| 26 | 26 | $app['sandstone.push'], |
| 27 | 27 | $app['dispatcher'], |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | public function send($message) |
| 32 | 32 | { |
| 33 | 33 | $this->pushServer->send($message); |
| 34 | - $this->sentMessages []= $message; |
|
| 34 | + $this->sentMessages [] = $message; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $this->data['messages_size'] += $messageSize; |
| 56 | 56 | $this->data['messages_count']++; |
| 57 | 57 | |
| 58 | - $this->data['messages'] []= array( |
|
| 58 | + $this->data['messages'] [] = array( |
|
| 59 | 59 | 'content' => $message, |
| 60 | 60 | 'size' => $messageSize, |
| 61 | 61 | 'decoded' => unserialize($message), |
@@ -13,16 +13,16 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function register(Container $app) |
| 15 | 15 | { |
| 16 | - $app->extend('data_collectors', function ($collectors) { |
|
| 17 | - $collectors[PushServerDataCollector::NAME] = function ($app) { |
|
| 16 | + $app->extend('data_collectors', function($collectors) { |
|
| 17 | + $collectors[PushServerDataCollector::NAME] = function($app) { |
|
| 18 | 18 | return new PushServerDataCollector($app['sandstone.push']); |
| 19 | 19 | }; |
| 20 | 20 | |
| 21 | 21 | return $collectors; |
| 22 | 22 | }); |
| 23 | 23 | |
| 24 | - $app['data_collector.templates'] = $app->extend('data_collector.templates', function ($templates) { |
|
| 25 | - $templates []= array( |
|
| 24 | + $app['data_collector.templates'] = $app->extend('data_collector.templates', function($templates) { |
|
| 25 | + $templates [] = array( |
|
| 26 | 26 | PushServerDataCollector::NAME, |
| 27 | 27 | 'push-messages.html.twig', |
| 28 | 28 | ); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | return $templates; |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | - $app['twig.loader.filesystem'] = $app->extend('twig.loader.filesystem', function ($loader) { |
|
| 33 | + $app['twig.loader.filesystem'] = $app->extend('twig.loader.filesystem', function($loader) { |
|
| 34 | 34 | $loader->addPath(__DIR__.'/DataCollector/views'); |
| 35 | 35 | |
| 36 | 36 | return $loader; |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register(Container $app) |
| 17 | 17 | { |
| 18 | - $app['sandstone.push'] = function () use ($app) { |
|
| 18 | + $app['sandstone.push'] = function() use ($app) { |
|
| 19 | 19 | $pushServerHost = $app['sandstone.push.server']['host']; |
| 20 | 20 | $pushServerPort = $app['sandstone.push.server']['port']; |
| 21 | 21 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $pushServerMock |
| 24 | 24 | ->expects($this->once()) |
| 25 | 25 | ->method('send') |
| 26 | - ->with($this->callback(function ($message) { |
|
| 26 | + ->with($this->callback(function($message) { |
|
| 27 | 27 | $decodedMessage = unserialize($message); |
| 28 | 28 | $serializedEvent = '{"propagation_stopped":false,"id":42,"title":"title","url":"url"}'; |
| 29 | 29 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | $app = new App\AppRestApi([ |
| 16 | 16 | 'debug' => true, |
| 17 | - 'sandstone.push' => function () use ($pushServerMock) { |
|
| 17 | + 'sandstone.push' => function() use ($pushServerMock) { |
|
| 18 | 18 | return $pushServerMock; |
| 19 | 19 | }, |
| 20 | 20 | ]); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $pushServerMock |
| 25 | 25 | ->expects($this->once()) |
| 26 | 26 | ->method('send') |
| 27 | - ->with($this->callback(function ($message) { |
|
| 27 | + ->with($this->callback(function($message) { |
|
| 28 | 28 | $decodedMessage = unserialize($message); |
| 29 | 29 | $serializedEvent = '{"propagation_stopped":false,"id":42,"title":"Unicorns spotted in Alaska","url":"http:\/\/unicorn.com\/articles\/unicorns-spotted-alaska"}'; |
| 30 | 30 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | parent::__construct($values); |
| 12 | 12 | |
| 13 | - $this->post('api/articles', function () { |
|
| 13 | + $this->post('api/articles', function() { |
|
| 14 | 14 | $id = 42; |
| 15 | 15 | $title = 'Unicorns spotted in Alaska'; |
| 16 | 16 | $url = 'http://unicorn.com/articles/unicorns-spotted-alaska'; |