@@ -118,7 +118,7 @@ public function __construct(Config | array | string $config = null, bool $debug
118118 if (isset (static ::$ config )) {
119119 throw new LogicException ('App already initialized ' );
120120 }
121- if ( ! $ config instanceof Config) {
121+ if (! $ config instanceof Config) {
122122 $ config = new Config ($ config );
123123 }
124124 static ::$ config = $ config ;
@@ -179,7 +179,7 @@ protected function loadExceptionHandler() : void
179179 if ($ config ->getDir () !== null ) {
180180 $ exceptionHandlerConfigs ??= $ this ->loadConfigs ('exceptionHandler ' );
181181 }
182- if ( ! isset ($ exceptionHandlerConfigs ['default ' ])) {
182+ if (! isset ($ exceptionHandlerConfigs ['default ' ])) {
183183 $ environment = static ::isDebugging ()
184184 ? ExceptionHandler::DEVELOPMENT
185185 : ExceptionHandler::PRODUCTION ;
@@ -231,8 +231,8 @@ protected function debugEnd() : void
231231 {
232232 static ::$ debugCollector ->setEndTime ()->setEndMemory ();
233233 $ response = static ::router ()->getResponse ();
234- if ( ! $ response ->hasDownload ()
235- && ! $ response ->getRequest ()->isAjax ()
234+ if (! $ response ->hasDownload ()
235+ && !$ response ->getRequest ()->isAjax ()
236236 && \str_contains (
237237 (string ) $ response ->getHeader ('Content-Type ' ),
238238 'text/html '
@@ -493,7 +493,7 @@ protected static function addCommand(string $file, Console $console, Locator $lo
493493 if ($ className === null ) {
494494 return false ;
495495 }
496- if ( ! \class_exists ($ className )) {
496+ if (! \class_exists ($ className )) {
497497 Isolation::require ($ file );
498498 }
499499 $ class = new ReflectionClass ($ className ); // @phpstan-ignore-line
@@ -1037,7 +1037,7 @@ protected static function setRouter(string $instance, array $config = null) : Ro
10371037 if (isset ($ config ['auto_methods ' ]) && $ config ['auto_methods ' ] === true ) {
10381038 $ service ->setAutoMethods ();
10391039 }
1040- if ( ! empty ($ config ['placeholders ' ])) {
1040+ if (! empty ($ config ['placeholders ' ])) {
10411041 $ service ->addPlaceholder ($ config ['placeholders ' ]);
10421042 }
10431043 if ($ requireFiles && isset ($ config ['files ' ])) {
@@ -1058,7 +1058,7 @@ protected static function setRouter(string $instance, array $config = null) : Ro
10581058 protected static function requireRouterFiles (array $ files , Router $ router ) : void
10591059 {
10601060 foreach ($ files as $ file ) {
1061- if ( ! \is_file ($ file )) {
1061+ if (! \is_file ($ file )) {
10621062 throw new LogicException ('Invalid router file: ' . $ file );
10631063 }
10641064 Isolation::require ($ file , ['router ' => $ router ]);
@@ -1166,10 +1166,10 @@ protected static function setResponse(string $instance) : Response
11661166 {
11671167 $ config = static ::config ()->get ('response ' , $ instance );
11681168 $ service = new Response (static ::request ($ config ['request_instance ' ] ?? 'default ' ));
1169- if ( ! empty ($ config ['headers ' ])) {
1169+ if (! empty ($ config ['headers ' ])) {
11701170 $ service ->setHeaders ($ config ['headers ' ]);
11711171 }
1172- if ( ! empty ($ config ['auto_etag ' ])) {
1172+ if (! empty ($ config ['auto_etag ' ])) {
11731173 $ service ->setAutoEtag (
11741174 $ config ['auto_etag ' ]['active ' ] ?? true ,
11751175 $ config ['auto_etag ' ]['hash_algo ' ] ?? null
0 commit comments