@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $container = new League\Container\Container; |
| 4 | 4 | |
| 5 | 5 | // Register the request object singleton to be used later in the request cyncle |
| 6 | -$container->singleton('Symfony\Component\HttpFoundation\Request', function () { |
|
| 6 | +$container->singleton('Symfony\Component\HttpFoundation\Request', function() { |
|
| 7 | 7 | return Symfony\Component\HttpFoundation\Request::createFromGlobals(); |
| 8 | 8 | }); |
| 9 | 9 | |
@@ -17,21 +17,21 @@ |
||
| 17 | 17 | |
| 18 | 18 | // Inflectors |
| 19 | 19 | $container->inflector('Ps2alerts\Api\Contract\ConfigAwareInterface') |
| 20 | - ->invokeMethod('setConfig', ['config']); |
|
| 20 | + ->invokeMethod('setConfig', ['config']); |
|
| 21 | 21 | $container->inflector('Ps2alerts\Api\Contract\DatabaseAwareInterface') |
| 22 | - ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
| 22 | + ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
| 23 | 23 | $container->inflector('Ps2alerts\Api\Contract\LogAwareInterface') |
| 24 | - ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
| 24 | + ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
| 25 | 25 | $container->inflector('Ps2alerts\Api\Contract\TemplateAwareInterface') |
| 26 | - ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
| 26 | + ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
| 27 | 27 | $container->inflector('Ps2alerts\Api\Contract\RedisAwareInterface') |
| 28 | - ->invokeMethod('setRedisDriver', ['redis']); |
|
| 28 | + ->invokeMethod('setRedisDriver', ['redis']); |
|
| 29 | 29 | $container->inflector('Ps2alerts\Api\Contract\UuidAwareInterface') |
| 30 | - ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
| 30 | + ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | // Container Inflector |
| 34 | 34 | $container->inflector('League\Container\ContainerAwareInterface') |
| 35 | - ->invokeMethod('setContainer', [$container]); |
|
| 35 | + ->invokeMethod('setContainer', [$container]); |
|
| 36 | 36 | |
| 37 | 37 | return $container; |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | // Register the singleton with the container |
| 35 | - $this->getContainer()->singleton('Twig_Environment', function () use ($globals, $config) { |
|
| 35 | + $this->getContainer()->singleton('Twig_Environment', function() use ($globals, $config) { |
|
| 36 | 36 | |
| 37 | 37 | $cache = false; |
| 38 | 38 | $debug = true; |
| 39 | 39 | |
| 40 | 40 | if ($config['environment'] === "production" || $config['environment'] === "staging") { |
| 41 | - $cache = __DIR__ .'/../../cache'; |
|
| 41 | + $cache = __DIR__ . '/../../cache'; |
|
| 42 | 42 | $debug = false; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->getContainer()->singleton('Aura\Sql', function () { |
|
| 22 | + $this->getContainer()->singleton('Aura\Sql', function() { |
|
| 23 | 23 | $config = $this->getContainer()->get('config')['database']; |
| 24 | 24 | |
| 25 | 25 | $pdo = new ExtendedPdo( |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register() |
| 20 | 20 | { |
| 21 | - $this->getContainer()->singleton('config', function () { |
|
| 21 | + $this->getContainer()->singleton('config', function() { |
|
| 22 | 22 | return include __DIR__ . '/../../config/config.php'; |
| 23 | 23 | }); |
| 24 | 24 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->getContainer()->singleton('redis', function () { |
|
| 26 | + $this->getContainer()->singleton('redis', function() { |
|
| 27 | 27 | $redisConfig = $this->getContainer()->get('config')['redis']; |
| 28 | 28 | |
| 29 | 29 | $client = new Client([ |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function register() |
| 22 | 22 | { |
| 23 | - $this->getContainer()->singleton('Monolog\Logger', function () { |
|
| 23 | + $this->getContainer()->singleton('Monolog\Logger', function() { |
|
| 24 | 24 | $log = new Logger('app'); |
| 25 | 25 | $log->pushHandler( |
| 26 | 26 | new StreamHandler(__DIR__ . '/../../logs/app.log', Logger::DEBUG) |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->getContainer()->add('Ramsey\Uuid\Uuid', function () { |
|
| 22 | + $this->getContainer()->add('Ramsey\Uuid\Uuid', function() { |
|
| 23 | 23 | $uuid = Uuid::Uuid4(); |
| 24 | 24 | return $uuid; |
| 25 | 25 | }); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $response->setStatusCode(404)->setContent( |
| 29 | 29 | $container->get('Twig_Environment')->render('404.html') |
| 30 | 30 | ); |
| 31 | -} catch(\Exception $e) { |
|
| 31 | +} catch (\Exception $e) { |
|
| 32 | 32 | $response->setStatusCode(500)->setContent( |
| 33 | 33 | 'An error occured! ' . $e->getMessage() |
| 34 | 34 | ); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * |
| 133 | 133 | * @param array $data |
| 134 | 134 | * |
| 135 | - * @return League\Fractal\Resource\Collection |
|
| 135 | + * @return \League\Fractal\Resource\Collection |
|
| 136 | 136 | */ |
| 137 | 137 | public function includeClasses($data) |
| 138 | 138 | { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @param array $data |
| 147 | 147 | * |
| 148 | - * @return League\Fractal\Resource\Collection |
|
| 148 | + * @return \League\Fractal\Resource\Collection |
|
| 149 | 149 | */ |
| 150 | 150 | public function includeCombatHistorys($data) |
| 151 | 151 | { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * |
| 159 | 159 | * @param array $data |
| 160 | 160 | * |
| 161 | - * @return League\Fractal\Resource\Collection |
|
| 161 | + * @return \League\Fractal\Resource\Item |
|
| 162 | 162 | */ |
| 163 | 163 | public function includeFactions($data) |
| 164 | 164 | { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | * |
| 172 | 172 | * @param array $data |
| 173 | 173 | * |
| 174 | - * @return League\Fractal\Resource\Collection |
|
| 174 | + * @return \League\Fractal\Resource\Collection |
|
| 175 | 175 | */ |
| 176 | 176 | public function includeMapInitials($data) |
| 177 | 177 | { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * |
| 185 | 185 | * @param array $data |
| 186 | 186 | * |
| 187 | - * @return League\Fractal\Resource\Collection |
|
| 187 | + * @return \League\Fractal\Resource\Collection |
|
| 188 | 188 | */ |
| 189 | 189 | public function includeMaps($data) |
| 190 | 190 | { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * |
| 198 | 198 | * @param array $data |
| 199 | 199 | * |
| 200 | - * @return League\Fractal\Resource\Collection |
|
| 200 | + * @return \League\Fractal\Resource\Collection |
|
| 201 | 201 | */ |
| 202 | 202 | public function includeOutfits($data) |
| 203 | 203 | { |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @param array $data |
| 212 | 212 | * |
| 213 | - * @return League\Fractal\Resource\Collection |
|
| 213 | + * @return \League\Fractal\Resource\Collection |
|
| 214 | 214 | */ |
| 215 | 215 | public function includePopulations($data) |
| 216 | 216 | { |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | * |
| 224 | 224 | * @param array $data |
| 225 | 225 | * |
| 226 | - * @return League\Fractal\Resource\Collection |
|
| 226 | + * @return \League\Fractal\Resource\Collection |
|
| 227 | 227 | */ |
| 228 | 228 | public function includePlayers($data) |
| 229 | 229 | { |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * |
| 237 | 237 | * @param array $data |
| 238 | 238 | * |
| 239 | - * @return League\Fractal\Resource\Collection |
|
| 239 | + * @return \League\Fractal\Resource\Collection |
|
| 240 | 240 | */ |
| 241 | 241 | public function includeVehicles($data) |
| 242 | 242 | { |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * |
| 250 | 250 | * @param array $data |
| 251 | 251 | * |
| 252 | - * @return League\Fractal\Resource\Collection |
|
| 252 | + * @return \League\Fractal\Resource\Collection |
|
| 253 | 253 | */ |
| 254 | 254 | public function includeWeapons($data) |
| 255 | 255 | { |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | * |
| 263 | 263 | * @param array $data |
| 264 | 264 | * |
| 265 | - * @return League\Fractal\Resource\Collection |
|
| 265 | + * @return \League\Fractal\Resource\Collection |
|
| 266 | 266 | */ |
| 267 | 267 | public function includeXps($data) |
| 268 | 268 | { |