@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | chdir(dirname(__DIR__)); |
15 | 15 | |
16 | -$filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); |
|
16 | +$filename = __DIR__ . preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); |
|
17 | 17 | if (php_sapi_name() === 'cli-server' && is_file($filename)) { |
18 | 18 | return false; |
19 | 19 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $this->controllers($route); |
59 | 59 | |
60 | 60 | $this->before( |
61 | - function (Request $request) { |
|
61 | + function(Request $request) { |
|
62 | 62 | // Skipping OPTIONS requests |
63 | 63 | if ($request->getMethod() === 'OPTIONS') { |
64 | 64 | return; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ); |
85 | 85 | |
86 | 86 | $this->after( |
87 | - function (Request $request, Response $response, Bootstrap $app) { |
|
87 | + function(Request $request, Response $response, Bootstrap $app) { |
|
88 | 88 | $app[CorsServiceProvider::HTTP_CORS]($request, $response); |
89 | 89 | |
90 | 90 | $this['dispatcher']->dispatch($request->attributes->get('_route') . '.after'); |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | ); |
93 | 93 | |
94 | 94 | $this->finish( |
95 | - function (Request $request, Response $response) { |
|
95 | + function(Request $request, Response $response) { |
|
96 | 96 | $this['dispatcher']->dispatch($request->attributes->get('_route') . '.finish'); |
97 | 97 | } |
98 | 98 | ); |
99 | 99 | |
100 | 100 | $this->error( |
101 | - function (\Exception $e, $code = Response::HTTP_INTERNAL_SERVER_ERROR) { |
|
101 | + function(\Exception $e, $code = Response::HTTP_INTERNAL_SERVER_ERROR) { |
|
102 | 102 | if ($e->getCode() !== 0) { |
103 | 103 | $code = $e->getCode(); |
104 | 104 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | $this['routes'] = $this->extend( |
124 | 124 | 'routes', |
125 | - function (RouteCollection $routes) use ($routeFile) { |
|
125 | + function(RouteCollection $routes) use ($routeFile) { |
|
126 | 126 | $routesPath = dirname($routeFile); |
127 | 127 | $loader = new RoutingFileLoader(new FileLocator($routesPath)); |
128 | 128 | $collection = $loader->load(basename($routeFile)); |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | 'orm.auto_generate_proxies' => APPLICATION_ENV !== 'production' ? true : false, |
188 | 188 | "orm.em.options" => [ |
189 | 189 | "mappings" => $this['config']['mappings'], |
190 | - "query_cache" => [ "driver" => "array" ], |
|
191 | - "metadata_cache" => [ "driver" => "array" ], |
|
192 | - "hydratation_cache" => [ "driver" => "array" ] |
|
190 | + "query_cache" => ["driver" => "array"], |
|
191 | + "metadata_cache" => ["driver" => "array"], |
|
192 | + "hydratation_cache" => ["driver" => "array"] |
|
193 | 193 | ] |
194 | 194 | ] |
195 | 195 | ); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | private function translations() |
227 | 227 | { |
228 | - $this['translator'] = $this->share($this->extend('translator', function ($translator) { |
|
228 | + $this['translator'] = $this->share($this->extend('translator', function($translator) { |
|
229 | 229 | $translator->addLoader('yaml', new TranslationFileLoader()); |
230 | 230 | |
231 | 231 | $translator->addResource('yaml', 'config/locales/pt-br.yml', 'pt-br'); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | parent::__construct($em); |
39 | 39 | |
40 | - $this->users = $users; |
|
40 | + $this->users = $users; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -21,17 +21,17 @@ |
||
21 | 21 | |
22 | 22 | $app['logger']->addDebug('Loading metadata...'); |
23 | 23 | |
24 | -$metadata = $app['orm.em']->getMetadataFactory()->getAllMetadata(); |
|
24 | +$metadata = $app['orm.em']->getMetadataFactory()->getAllMetadata(); |
|
25 | 25 | |
26 | 26 | $app['logger']->addDebug('Creating schema...'); |
27 | 27 | |
28 | -$tool = new SchemaTool($app['orm.em']); |
|
28 | +$tool = new SchemaTool($app['orm.em']); |
|
29 | 29 | $tool->dropSchema($metadata); |
30 | 30 | $tool->createSchema($metadata); |
31 | 31 | |
32 | 32 | $app['logger']->addDebug('Loading fixtures...'); |
33 | 33 | |
34 | -$loader = new Loader(); |
|
34 | +$loader = new Loader(); |
|
35 | 35 | $loader->loadFromDirectory('tests/Fixtures'); |
36 | 36 | |
37 | 37 | $app['logger']->addDebug('Executing fixtures...'); |