Completed
Branch dev (9aae00)
by Julien
03:37
created
src/Eole/Silex/Provider/WebsocketProvider.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Pimple\ServiceProviderInterface;
6 6
 use Pimple\Container;
7
-use Eole\WebSocket\Routing\TopicRoute;
8 7
 
9 8
 class WebsocketProvider implements ServiceProviderInterface
10 9
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
      */
14 14
     public function register(Container $app)
15 15
     {
16
-        $app->topic('eole/core/chat', function ($topicPattern) {
16
+        $app->topic('eole/core/chat', function($topicPattern) {
17 17
             return new \Eole\WebSocket\Topic\ChatTopic($topicPattern);
18 18
         });
19 19
 
20
-        $app->topic('eole/core/parties', function ($topicPattern) {
20
+        $app->topic('eole/core/parties', function($topicPattern) {
21 21
             return new \Eole\WebSocket\Topic\PartiesTopic($topicPattern);
22 22
         });
23 23
 
24 24
         $app
25
-            ->topic('eole/core/game/{game_name}/parties', function ($topicPattern, $arguments) {
25
+            ->topic('eole/core/game/{game_name}/parties', function($topicPattern, $arguments) {
26 26
                 return new \Eole\WebSocket\Topic\PartiesTopic($topicPattern, $arguments);
27 27
             })
28 28
             ->assert('game_name', '^[a-z0-9_\-]+$')
Please login to merge, or discard this patch.
src/Eole/Games/Awale/ControllerProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function register(Container $app)
18 18
     {
19
-        $app['eole.games.awale.controller'] = function () use ($app) {
19
+        $app['eole.games.awale.controller'] = function() use ($app) {
20 20
             return new RestApi\Controller(
21 21
                 $app['orm.em']->getRepository('EoleAwale:AwaleParty'),
22 22
                 $app['orm.em'],
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             );
26 26
         };
27 27
 
28
-        $app->before(function () use ($app) {
28
+        $app->before(function() use ($app) {
29 29
             if (null !== $app['user']) {
30 30
                 $app['eole.games.awale.controller']->setLoggedPlayer($app['user']);
31 31
             }
Please login to merge, or discard this patch.
src/Eole/Games/Awale/ServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
             'Eole\\Games\\Awale'
23 23
         );
24 24
 
25
-        $app->extend('eole.mappings', function ($mappings, $app) {
26
-            $mappings []= array(
25
+        $app->extend('eole.mappings', function($mappings, $app) {
26
+            $mappings [] = array(
27 27
                 'type' => 'yml',
28 28
                 'namespace' => 'Alcalyn\\Awale',
29 29
                 'path' => $app['project.root'].'/src/Eole/Games/Awale/Mapping',
30 30
                 'alias' => 'Awale',
31 31
             );
32 32
 
33
-            $mappings []= array(
33
+            $mappings [] = array(
34 34
                 'type' => 'yml',
35 35
                 'namespace' => 'Eole\\Games\\Awale\\Model',
36 36
                 'path' => $app['project.root'].'/src/Eole/Games/Awale/Mapping',
Please login to merge, or discard this patch.
src/Eole/Games/Awale/WebsocketProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public function register(Container $app)
12 12
     {
13 13
         $app
14
-            ->topic('eole/games/awale/parties/{party_id}', function ($topicPattern, $arguments) {
14
+            ->topic('eole/games/awale/parties/{party_id}', function($topicPattern, $arguments) {
15 15
                 return new AwaleTopic($topicPattern, intval($arguments['party_id']));
16 16
             })
17 17
             ->assert('party_id', '^[0-9]+$')
Please login to merge, or discard this patch.
src/Eole/Games/TicTacToe/TicTacToeWebsocketProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function register(Container $app)
11 11
     {
12 12
         $app
13
-            ->topic('eole/games/tictactoe/parties/{party_id}', function ($topicPattern, $arguments) use ($app) {
13
+            ->topic('eole/games/tictactoe/parties/{party_id}', function($topicPattern, $arguments) use ($app) {
14 14
                 $partyId = $arguments['party_id'];
15 15
                 $partyRepository = $app['orm.em']->getRepository('Eole:Party');
16 16
                 $party = $partyRepository->findFullPartyById($partyId, 'tictactoe');
Please login to merge, or discard this patch.
src/Eole/Silex/Application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     private function registerSecurity()
93 93
     {
94
-        $userProvider = function () {
94
+        $userProvider = function() {
95 95
             return new \Alcalyn\UserApi\Security\UserProvider($this['eole.player_api']);
96 96
         };
97 97
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             ),
108 108
         ));
109 109
 
110
-        $this['security.default_encoder'] = function () {
110
+        $this['security.default_encoder'] = function() {
111 111
             return $this['security.encoder.digest'];
112 112
         };
113 113
 
@@ -208,10 +208,10 @@  discard block
 block discarded – undo
208 208
             ],
209 209
         ]);
210 210
 
211
-        $this['eole.mappings'] = function () {
211
+        $this['eole.mappings'] = function() {
212 212
             $mappings = array();
213 213
 
214
-            $mappings []= array(
214
+            $mappings [] = array(
215 215
                 'type' => 'yml',
216 216
                 'namespace' => 'Alcalyn\UserApi\Model',
217 217
                 'path' => $this['project.root'].'/vendor/alcalyn/doctrine-user-api/Mapping',
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             return $mappings;
221 221
         };
222 222
 
223
-        $this['eole.listener.authorization_header_fix'] = function () {
223
+        $this['eole.listener.authorization_header_fix'] = function() {
224 224
             return new \Alcalyn\AuthorizationHeaderFix\AuthorizationHeaderFixListener();
225 225
         };
226 226
     }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     private function logErrors()
263 263
     {
264
-        $this->error(function (\Exception $e) {
264
+        $this->error(function(\Exception $e) {
265 265
             $logFile = $this['project.root'].'/var/logs/errors.txt';
266 266
             $message = get_class($e).' '.$e->getMessage().PHP_EOL.$e->getTraceAsString().PHP_EOL.PHP_EOL;
267 267
             file_put_contents($logFile, $message, FILE_APPEND);
Please login to merge, or discard this patch.
src/Eole/Silex/Tests/AbstractApplicationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             'debug' => true,
43 43
         ));
44 44
 
45
-        $app['eole.oauth.resource_server'] = function () use ($app) {
45
+        $app['eole.oauth.resource_server'] = function() use ($app) {
46 46
             return new ResourceServerMock(
47 47
                 $app['eole.oauth.storage.session'],
48 48
                 $app['eole.oauth.storage.access_token'],
Please login to merge, or discard this patch.
src/Eole/Silex/Tests/UserApiTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,11 +147,11 @@
 block discarded – undo
147 147
 
148 148
         $client->request('POST', '/api/players/guest');
149 149
         $this->assertEquals(Response::HTTP_CREATED, $client->getResponse()->getStatusCode(), 'Creating first guest.');
150
-        $guests []= json_decode($client->getResponse()->getContent());
150
+        $guests [] = json_decode($client->getResponse()->getContent());
151 151
 
152 152
         $client->request('POST', '/api/players/guest');
153 153
         $this->assertEquals(Response::HTTP_CREATED, $client->getResponse()->getStatusCode(), 'Creating second guest.');
154
-        $guests []= json_decode($client->getResponse()->getContent());
154
+        $guests [] = json_decode($client->getResponse()->getContent());
155 155
 
156 156
         $this->assertNotEquals($guests[0]->id, $guests[1]->id, 'Comparing guests ids.');
157 157
         $this->assertNotEquals($guests[0]->username, $guests[1]->username, 'Comparing guests usernames.');
Please login to merge, or discard this patch.
src/Eole/Silex/Command/InstallGamesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $installedGamesNames = array();
51 51
 
52 52
         foreach ($installedGames as $game) {
53
-            $installedGamesNames []= $game->getName();
53
+            $installedGamesNames [] = $game->getName();
54 54
         }
55 55
 
56 56
         $newDetectedGames = array_diff(array_keys($gameProviders), $installedGamesNames);
Please login to merge, or discard this patch.