@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $finalizer->addFinalizer( |
55 | 55 | function () use ($container): void { |
56 | - if ($container->hasInstance(ORMInterface::class)) { |
|
56 | + if ($container->hasInstance(ORMInterface::class)){ |
|
57 | 57 | $container->get(ORMInterface::class)->getHeap()->clean(); |
58 | 58 | } |
59 | 59 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ): ORMInterface { |
76 | 76 | $orm = new ORM($factory, $schema); |
77 | 77 | |
78 | - if ($promiseFactory !== null) { |
|
78 | + if ($promiseFactory !== null){ |
|
79 | 79 | return $orm->withPromiseFactory($promiseFactory); |
80 | 80 | } |
81 | 81 |
@@ -53,7 +53,8 @@ discard block |
||
53 | 53 | { |
54 | 54 | $finalizer->addFinalizer( |
55 | 55 | function () use ($container): void { |
56 | - if ($container->hasInstance(ORMInterface::class)) { |
|
56 | + if ($container->hasInstance(ORMInterface::class)) |
|
57 | + { |
|
57 | 58 | $container->get(ORMInterface::class)->getHeap()->clean(); |
58 | 59 | } |
59 | 60 | } |
@@ -75,7 +76,8 @@ discard block |
||
75 | 76 | ): ORMInterface { |
76 | 77 | $orm = new ORM($factory, $schema); |
77 | 78 | |
78 | - if ($promiseFactory !== null) { |
|
79 | + if ($promiseFactory !== null) |
|
80 | + { |
|
79 | 81 | return $orm->withPromiseFactory($promiseFactory); |
80 | 82 | } |
81 | 83 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | ] |
57 | 57 | ); |
58 | 58 | |
59 | - if ($env->get('RR_BROADCAST_PATH', null) !== null) { |
|
59 | + if ($env->get('RR_BROADCAST_PATH', null) !== null){ |
|
60 | 60 | $http->addMiddleware(WebsocketsMiddleware::class); |
61 | 61 | } |
62 | 62 | } |
@@ -56,7 +56,8 @@ |
||
56 | 56 | ] |
57 | 57 | ); |
58 | 58 | |
59 | - if ($env->get('RR_BROADCAST_PATH', null) !== null) { |
|
59 | + if ($env->get('RR_BROADCAST_PATH', null) !== null) |
|
60 | + { |
|
60 | 61 | $http->addMiddleware(WebsocketsMiddleware::class); |
61 | 62 | } |
62 | 63 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | private function route(ServerRequestInterface $request): RouteInterface |
58 | 58 | { |
59 | 59 | $route = $request->getAttribute(Router::ROUTE_ATTRIBUTE, null); |
60 | - if ($route === null) { |
|
60 | + if ($route === null){ |
|
61 | 61 | throw new ScopeException('Unable to resolve Route, invalid request scope'); |
62 | 62 | } |
63 | 63 |
@@ -57,7 +57,8 @@ |
||
57 | 57 | private function route(ServerRequestInterface $request): RouteInterface |
58 | 58 | { |
59 | 59 | $route = $request->getAttribute(Router::ROUTE_ATTRIBUTE, null); |
60 | - if ($route === null) { |
|
60 | + if ($route === null) |
|
61 | + { |
|
61 | 62 | throw new ScopeException('Unable to resolve Route, invalid request scope'); |
62 | 63 | } |
63 | 64 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'handler' => new Autowire( |
63 | 63 | FileHandler::class, |
64 | 64 | [ |
65 | - 'directory' => $directories->get('runtime') . 'session', |
|
65 | + 'directory' => $directories->get('runtime').'session', |
|
66 | 66 | 'lifetime' => 86400 |
67 | 67 | ] |
68 | 68 | ) |
@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); |
76 | 76 | |
77 | - if (class_exists(PSR7Client::class)) { |
|
77 | + if (class_exists(PSR7Client::class)){ |
|
78 | 78 | $kernel->addDispatcher($factory->make(RrDispatcher::class)); |
79 | 79 | } |
80 | 80 | } |
@@ -74,7 +74,8 @@ |
||
74 | 74 | |
75 | 75 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); |
76 | 76 | |
77 | - if (class_exists(PSR7Client::class)) { |
|
77 | + if (class_exists(PSR7Client::class)) |
|
78 | + { |
|
78 | 79 | $kernel->addDispatcher($factory->make(RrDispatcher::class)); |
79 | 80 | } |
80 | 81 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | private function cookieQueue(ServerRequestInterface $request): CookieQueue |
73 | 73 | { |
74 | 74 | $cookieQueue = $request->getAttribute(CookieQueue::ATTRIBUTE, null); |
75 | - if ($cookieQueue === null) { |
|
75 | + if ($cookieQueue === null){ |
|
76 | 76 | throw new ScopeException('Unable to resolve CookieQueue, invalid request scope'); |
77 | 77 | } |
78 | 78 |
@@ -72,7 +72,8 @@ |
||
72 | 72 | private function cookieQueue(ServerRequestInterface $request): CookieQueue |
73 | 73 | { |
74 | 74 | $cookieQueue = $request->getAttribute(CookieQueue::ATTRIBUTE, null); |
75 | - if ($cookieQueue === null) { |
|
75 | + if ($cookieQueue === null) |
|
76 | + { |
|
76 | 77 | throw new ScopeException('Unable to resolve CookieQueue, invalid request scope'); |
77 | 78 | } |
78 | 79 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $core = new InterceptableCore($core); |
40 | 40 | |
41 | - foreach (static::INTERCEPTORS as $interceptor) { |
|
41 | + foreach (static::INTERCEPTORS as $interceptor){ |
|
42 | 42 | $core->addInterceptor($container->get($interceptor)); |
43 | 43 | } |
44 | 44 |
@@ -38,7 +38,8 @@ |
||
38 | 38 | { |
39 | 39 | $core = new InterceptableCore($core); |
40 | 40 | |
41 | - foreach (static::INTERCEPTORS as $interceptor) { |
|
41 | + foreach (static::INTERCEPTORS as $interceptor) |
|
42 | + { |
|
42 | 43 | $core->addInterceptor($container->get($interceptor)); |
43 | 44 | } |
44 | 45 |
@@ -60,8 +60,8 @@ |
||
60 | 60 | */ |
61 | 61 | public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs): void |
62 | 62 | { |
63 | - if (!$dirs->has('locale')) { |
|
64 | - $dirs->set('locale', $dirs->get('app') . 'locale/'); |
|
63 | + if (!$dirs->has('locale')){ |
|
64 | + $dirs->set('locale', $dirs->get('app').'locale/'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $this->config->setDefaults( |
@@ -58,7 +58,8 @@ |
||
58 | 58 | */ |
59 | 59 | public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs): void |
60 | 60 | { |
61 | - if (!$dirs->has('locale')) { |
|
61 | + if (!$dirs->has('locale')) |
|
62 | + { |
|
62 | 63 | $dirs->set('locale', $dirs->get('app') . 'locale/'); |
63 | 64 | } |
64 | 65 |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs): void |
46 | 46 | { |
47 | - if (!$dirs->has('views')) { |
|
48 | - $dirs->set('views', $dirs->get('app') . 'views'); |
|
47 | + if (!$dirs->has('views')){ |
|
48 | + $dirs->set('views', $dirs->get('app').'views'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | // default view config |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | [ |
55 | 55 | 'cache' => [ |
56 | 56 | 'enabled' => $env->get('VIEW_CACHE', !$env->get('DEBUG', false)), |
57 | - 'directory' => $dirs->get('cache') . 'views' |
|
57 | + 'directory' => $dirs->get('cache').'views' |
|
58 | 58 | ], |
59 | 59 | 'namespaces' => [ |
60 | 60 | 'default' => [$dirs->get('views')] |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function addDirectory(string $namespace, string $directory): void |
73 | 73 | { |
74 | - if (!isset($this->config->getConfig('views')['namespaces'][$namespace])) { |
|
74 | + if (!isset($this->config->getConfig('views')['namespaces'][$namespace])){ |
|
75 | 75 | $this->config->modify('views', new Append('namespaces', $namespace, [])); |
76 | 76 | } |
77 | 77 | |
78 | - $this->config->modify('views', new Append('namespaces.' . $namespace, null, $directory)); |
|
78 | + $this->config->modify('views', new Append('namespaces.'.$namespace, null, $directory)); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -42,7 +42,8 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs): void |
44 | 44 | { |
45 | - if (!$dirs->has('views')) { |
|
45 | + if (!$dirs->has('views')) |
|
46 | + { |
|
46 | 47 | $dirs->set('views', $dirs->get('app') . 'views'); |
47 | 48 | } |
48 | 49 | |
@@ -66,7 +67,8 @@ discard block |
||
66 | 67 | */ |
67 | 68 | public function addDirectory(string $namespace, string $directory): void |
68 | 69 | { |
69 | - if (!isset($this->config->getConfig('views')['namespaces'][$namespace])) { |
|
70 | + if (!isset($this->config->getConfig('views')['namespaces'][$namespace])) |
|
71 | + { |
|
70 | 72 | $this->config->modify('views', new Append('namespaces', $namespace, [])); |
71 | 73 | } |
72 | 74 |