@@ -117,7 +117,7 @@ public function __construct(Config | array | string $config = null, bool $debug
117
117
if (isset (static ::$ config )) {
118
118
throw new LogicException ('App already initialized ' );
119
119
}
120
- if ( ! $ config instanceof Config) {
120
+ if (! $ config instanceof Config) {
121
121
$ config = new Config ($ config );
122
122
}
123
123
static ::$ config = $ config ;
@@ -178,7 +178,7 @@ protected function loadExceptionHandler() : void
178
178
if ($ config ->getDir () !== null ) {
179
179
$ exceptionHandlerConfigs ??= $ this ->loadConfigs ('exceptionHandler ' );
180
180
}
181
- if ( ! isset ($ exceptionHandlerConfigs ['default ' ])) {
181
+ if (! isset ($ exceptionHandlerConfigs ['default ' ])) {
182
182
$ environment = static ::isDebugging ()
183
183
? ExceptionHandler::DEVELOPMENT
184
184
: ExceptionHandler::PRODUCTION ;
@@ -230,8 +230,8 @@ protected function debugEnd() : void
230
230
{
231
231
static ::$ debugCollector ->setEndTime ()->setEndMemory ();
232
232
$ response = static ::router ()->getResponse ();
233
- if ( ! $ response ->hasDownload ()
234
- && ! $ response ->getRequest ()->isAjax ()
233
+ if (! $ response ->hasDownload ()
234
+ && !$ response ->getRequest ()->isAjax ()
235
235
&& \str_contains (
236
236
(string ) $ response ->getHeader ('Content-Type ' ),
237
237
'text/html '
@@ -492,7 +492,7 @@ protected static function addCommand(string $file, Console $console, Locator $lo
492
492
if ($ className === null ) {
493
493
return false ;
494
494
}
495
- if ( ! \class_exists ($ className )) {
495
+ if (! \class_exists ($ className )) {
496
496
Isolation::require ($ file );
497
497
}
498
498
$ class = new ReflectionClass ($ className ); // @phpstan-ignore-line
@@ -1033,7 +1033,7 @@ protected static function setRouter(string $instance, array $config = null) : Ro
1033
1033
if (isset ($ config ['auto_methods ' ]) && $ config ['auto_methods ' ] === true ) {
1034
1034
$ service ->setAutoMethods ();
1035
1035
}
1036
- if ( ! empty ($ config ['placeholders ' ])) {
1036
+ if (! empty ($ config ['placeholders ' ])) {
1037
1037
$ service ->addPlaceholder ($ config ['placeholders ' ]);
1038
1038
}
1039
1039
if ($ requireFiles && isset ($ config ['files ' ])) {
@@ -1050,7 +1050,7 @@ protected static function setRouter(string $instance, array $config = null) : Ro
1050
1050
protected static function requireRouterFiles (array $ files ) : void
1051
1051
{
1052
1052
foreach ($ files as $ file ) {
1053
- if ( ! \is_file ($ file )) {
1053
+ if (! \is_file ($ file )) {
1054
1054
throw new LogicException ('Invalid router file: ' . $ file );
1055
1055
}
1056
1056
Isolation::require ($ file );
@@ -1158,10 +1158,10 @@ protected static function setResponse(string $instance) : Response
1158
1158
{
1159
1159
$ config = static ::config ()->get ('response ' , $ instance );
1160
1160
$ service = new Response (static ::request ($ config ['request_instance ' ] ?? 'default ' ));
1161
- if ( ! empty ($ config ['headers ' ])) {
1161
+ if (! empty ($ config ['headers ' ])) {
1162
1162
$ service ->setHeaders ($ config ['headers ' ]);
1163
1163
}
1164
- if ( ! empty ($ config ['auto_etag ' ])) {
1164
+ if (! empty ($ config ['auto_etag ' ])) {
1165
1165
$ service ->setAutoEtag (
1166
1166
$ config ['auto_etag ' ]['active ' ] ?? true ,
1167
1167
$ config ['auto_etag ' ]['hash_algo ' ] ?? null
0 commit comments