@@ -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'; |
@@ -14,16 +14,16 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function register(Container $app) |
16 | 16 | { |
17 | - $app->extend('data_collectors', function ($collectors) { |
|
18 | - $collectors[PushServerDataCollector::NAME] = function ($app) { |
|
17 | + $app->extend('data_collectors', function($collectors) { |
|
18 | + $collectors[PushServerDataCollector::NAME] = function($app) { |
|
19 | 19 | return new PushServerDataCollector($app['sandstone.push']); |
20 | 20 | }; |
21 | 21 | |
22 | 22 | return $collectors; |
23 | 23 | }); |
24 | 24 | |
25 | - $app['data_collector.templates'] = $app->extend('data_collector.templates', function ($templates) { |
|
26 | - $templates []= array( |
|
25 | + $app['data_collector.templates'] = $app->extend('data_collector.templates', function($templates) { |
|
26 | + $templates [] = array( |
|
27 | 27 | PushServerDataCollector::NAME, |
28 | 28 | 'push-messages.html.twig', |
29 | 29 | ); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | $app['twig.loader.filesystem'] = $app->extend( |
35 | 35 | 'twig.loader.filesystem', |
36 | - function (Twig_Loader_Filesystem $loader) { |
|
36 | + function(Twig_Loader_Filesystem $loader) { |
|
37 | 37 | $loader->addPath(__DIR__.'/DataCollector/views'); |
38 | 38 | |
39 | 39 | return $loader; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | $app = new App\App(); |
13 | 13 | |
14 | - $app->topic('articles', function ($topicPattern) { |
|
14 | + $app->topic('articles', function($topicPattern) { |
|
15 | 15 | return new App\ArticleTopic($topicPattern); |
16 | 16 | }); |
17 | 17 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | parent::__construct($values); |
10 | 10 | |
11 | - $this->topic('articles', function ($topicPattern, $arguments) { |
|
11 | + $this->topic('articles', function($topicPattern, $arguments) { |
|
12 | 12 | $channelName = $arguments['channel']; |
13 | 13 | |
14 | 14 | return new ArticleTopic($topicPattern, $channelName); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $app['sandstone.push.enabled'] = true; |
17 | 17 | } |
18 | 18 | |
19 | - $app['sandstone.push.event_serializer'] = function () use ($app) { |
|
19 | + $app['sandstone.push.event_serializer'] = function() use ($app) { |
|
20 | 20 | if (!$app->offsetExists('serializer')) { |
21 | 21 | throw new \RuntimeException('A serializer must be registered'); |
22 | 22 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | return new EventSerializer($app['serializer']); |
25 | 25 | }; |
26 | 26 | |
27 | - $app['sandstone.push.event_forwarder'] = function () use ($app) { |
|
27 | + $app['sandstone.push.event_forwarder'] = function() use ($app) { |
|
28 | 28 | return new EventForwarder( |
29 | 29 | $app['sandstone.push'], |
30 | 30 | $app['dispatcher'], |
@@ -25,11 +25,11 @@ |
||
25 | 25 | return parent::create() |
26 | 26 | ->setSerializationContextFactory(array(self::class, 'createDefaultSerializationContext')) |
27 | 27 | ->addDefaultHandlers() |
28 | - ->configureListeners(function (EventDispatcher $dispatcher) { |
|
28 | + ->configureListeners(function(EventDispatcher $dispatcher) { |
|
29 | 29 | $proxySubscriber = new DoctrineProxySubscriber(false); |
30 | 30 | $dispatcher->addSubscriber($proxySubscriber); |
31 | 31 | }) |
32 | - ->configureHandlers(function (HandlerRegistryInterface $handlerRegistry) { |
|
32 | + ->configureHandlers(function(HandlerRegistryInterface $handlerRegistry) { |
|
33 | 33 | $proxyHandler = new DoctrineProxyHandler(); |
34 | 34 | $handlerRegistry->registerSubscribingHandler($proxyHandler); |
35 | 35 | }) |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | $pushServer->bind("tcp://$pushBind:$pushPort"); |
81 | 81 | |
82 | - $pushServer->on('message', function ($message) { |
|
82 | + $pushServer->on('message', function($message) { |
|
83 | 83 | $data = $this->sandstoneApplication['sandstone.push.event_serializer']->deserializeEvent($message); |
84 | 84 | |
85 | 85 | $this->logger->info('Push message event', ['event' => $data['name']]); |
@@ -14,22 +14,22 @@ |
||
14 | 14 | { |
15 | 15 | public function register(Container $app) |
16 | 16 | { |
17 | - $app['sandstone.websocket.routes'] = function () { |
|
17 | + $app['sandstone.websocket.routes'] = function() { |
|
18 | 18 | return new RouteCollection(); |
19 | 19 | }; |
20 | 20 | |
21 | - $app['sandstone.websocket.topics'] = function () use ($app) { |
|
21 | + $app['sandstone.websocket.topics'] = function() use ($app) { |
|
22 | 22 | return new TopicCollection($app['sandstone.websocket.routes']); |
23 | 23 | }; |
24 | 24 | |
25 | - $app['sandstone.websocket.url_matcher'] = function () use ($app) { |
|
25 | + $app['sandstone.websocket.url_matcher'] = function() use ($app) { |
|
26 | 26 | return new UrlMatcher( |
27 | 27 | $app['sandstone.websocket.routes'], |
28 | 28 | new RequestContext() |
29 | 29 | ); |
30 | 30 | }; |
31 | 31 | |
32 | - $app['sandstone.websocket.router'] = function () use ($app) { |
|
32 | + $app['sandstone.websocket.router'] = function() use ($app) { |
|
33 | 33 | return new TopicRouter($app['sandstone.websocket.url_matcher']); |
34 | 34 | }; |
35 | 35 | } |