@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: liu21st <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\middleware; |
| 14 | 14 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | // 注册日志监听 |
| 62 | 62 | if ($debug) { |
| 63 | 63 | $this->log = []; |
| 64 | - $this->app->event->listen(LogWrite::class, function ($event) { |
|
| 64 | + $this->app->event->listen(LogWrite::class, function($event) { |
|
| 65 | 65 | if (empty($this->config['channel']) || $this->config['channel'] == $event->channel) { |
| 66 | 66 | $this->log = array_merge_recursive($this->log, $event->log); |
| 67 | 67 | } |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | // trace调试信息注入 |
| 100 | 100 | $pos = strripos($content, '</body>'); |
| 101 | 101 | if (false !== $pos) { |
| 102 | - $content = substr($content, 0, $pos) . $output . substr($content, $pos); |
|
| 102 | + $content = substr($content, 0, $pos).$output.substr($content, $pos); |
|
| 103 | 103 | } else { |
| 104 | - $content = $content . $output; |
|
| 104 | + $content = $content.$output; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: liu21st <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think; |
| 14 | 14 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | return $this->make($abstract); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - throw new ClassNotFoundException('class not exists: ' . $abstract, $abstract); |
|
| 134 | + throw new ClassNotFoundException('class not exists: '.$abstract, $abstract); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | } else { |
| 302 | 302 | $function .= '()'; |
| 303 | 303 | } |
| 304 | - throw new Exception('function not exists: ' . $function, 0, $e); |
|
| 304 | + throw new Exception('function not exists: '.$function, 0, $e); |
|
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | |
@@ -334,12 +334,12 @@ discard block |
||
| 334 | 334 | } catch (ReflectionException $e) { |
| 335 | 335 | if (is_array($method)) { |
| 336 | 336 | $class = is_object($method[0]) ? get_class($method[0]) : $method[0]; |
| 337 | - $callback = $class . '::' . $method[1]; |
|
| 337 | + $callback = $class.'::'.$method[1]; |
|
| 338 | 338 | } else { |
| 339 | 339 | $callback = $method; |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | - throw new Exception('method not exists: ' . $callback . '()', 0, $e); |
|
| 342 | + throw new Exception('method not exists: '.$callback.'()', 0, $e); |
|
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | return $object; |
| 408 | 408 | } catch (ReflectionException $e) { |
| 409 | - throw new ClassNotFoundException('class not exists: ' . $class, $class, $e); |
|
| 409 | + throw new ClassNotFoundException('class not exists: '.$class, $class, $e); |
|
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 | |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | } elseif ($param->isDefaultValueAvailable()) { |
| 468 | 468 | $args[] = $param->getDefaultValue(); |
| 469 | 469 | } else { |
| 470 | - throw new InvalidArgumentException('method param miss:' . $name); |
|
| 470 | + throw new InvalidArgumentException('method param miss:'.$name); |
|
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | |
@@ -485,13 +485,13 @@ discard block |
||
| 485 | 485 | */ |
| 486 | 486 | public static function factory(string $name, string $namespace = '', ...$args) |
| 487 | 487 | { |
| 488 | - $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name); |
|
| 488 | + $class = false !== strpos($name, '\\') ? $name : $namespace.ucwords($name); |
|
| 489 | 489 | |
| 490 | 490 | if (class_exists($class)) { |
| 491 | 491 | return Container::getInstance()->invokeClass($class, $args); |
| 492 | 492 | } |
| 493 | 493 | |
| 494 | - throw new ClassNotFoundException('class not exists:' . $class, $class); |
|
| 494 | + throw new ClassNotFoundException('class not exists:'.$class, $class); |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /** |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: liu21st <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\route\dispatch; |
| 14 | 14 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | if ($bind && preg_match('/^[a-z]/is', $bind)) { |
| 48 | 48 | $bind = str_replace('/', $depr, $bind); |
| 49 | 49 | // 如果有模块/控制器绑定 |
| 50 | - $url = $bind . ('.' != substr($bind, -1) ? $depr : '') . ltrim($url, $depr); |
|
| 50 | + $url = $bind.('.' != substr($bind, -1) ? $depr : '').ltrim($url, $depr); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $path = $this->rule->parseUrlPath($url); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $controller = !empty($path) ? array_shift($path) : null; |
| 60 | 60 | |
| 61 | 61 | if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) { |
| 62 | - throw new HttpException(404, 'controller not exists:' . $controller); |
|
| 62 | + throw new HttpException(404, 'controller not exists:'.$controller); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // 解析操作 |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | // 解析额外参数 |
| 70 | 70 | if ($path) { |
| 71 | - preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) { |
|
| 71 | + preg_replace_callback('/(\w+)\|([^\|]+)/', function($match) use (&$var) { |
|
| 72 | 72 | $var[$match[1]] = strip_tags($match[2]); |
| 73 | 73 | }, implode('|', $path)); |
| 74 | 74 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $route = [$controller, $action]; |
| 87 | 87 | |
| 88 | 88 | if ($this->hasDefinedRoute($route)) { |
| 89 | - throw new HttpException(404, 'invalid request:' . str_replace('|', $depr, $url)); |
|
| 89 | + throw new HttpException(404, 'invalid request:'.str_replace('|', $depr, $url)); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | return $route; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | list($controller, $action) = $route; |
| 104 | 104 | |
| 105 | 105 | // 检查地址是否被定义过路由 |
| 106 | - $name = strtolower(Str::studly($controller) . '/' . $action); |
|
| 106 | + $name = strtolower(Str::studly($controller).'/'.$action); |
|
| 107 | 107 | |
| 108 | 108 | $host = $this->request->host(true); |
| 109 | 109 | $method = $this->request->method(); |
@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | return false; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - $path = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($app ? $app . DIRECTORY_SEPARATOR : ''); |
|
| 37 | + $path = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.($app ? $app.DIRECTORY_SEPARATOR : ''); |
|
| 38 | 38 | |
| 39 | - $filename = $path . 'route.php'; |
|
| 39 | + $filename = $path.'route.php'; |
|
| 40 | 40 | if (is_file($filename)) { |
| 41 | 41 | unlink($filename); |
| 42 | 42 | } |
@@ -51,21 +51,21 @@ discard block |
||
| 51 | 51 | $this->app->route->lazy(false); |
| 52 | 52 | |
| 53 | 53 | // 路由检测 |
| 54 | - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . ($app ? $app . DIRECTORY_SEPARATOR : ''); |
|
| 54 | + $path = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR.($app ? $app.DIRECTORY_SEPARATOR : ''); |
|
| 55 | 55 | |
| 56 | 56 | $files = is_dir($path) ? scandir($path) : []; |
| 57 | 57 | |
| 58 | 58 | foreach ($files as $file) { |
| 59 | 59 | if (strpos($file, '.php')) { |
| 60 | - include $path . $file; |
|
| 60 | + include $path.$file; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | //触发路由载入完成事件 |
| 65 | 65 | $this->app->event->trigger(RouteLoaded::class); |
| 66 | 66 | |
| 67 | - $content = '<?php ' . PHP_EOL . 'return '; |
|
| 68 | - $content .= '\Opis\Closure\unserialize(\'' . \Opis\Closure\serialize($this->app->route->getName()) . '\');'; |
|
| 67 | + $content = '<?php '.PHP_EOL.'return '; |
|
| 68 | + $content .= '\Opis\Closure\unserialize(\''.\Opis\Closure\serialize($this->app->route->getName()).'\');'; |
|
| 69 | 69 | return $content; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | if ($app) { |
| 51 | - $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR . 'route_list_' . $app . '.php'; |
|
| 51 | + $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR.'route_list_'.$app.'.php'; |
|
| 52 | 52 | } else { |
| 53 | - $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'route_list.php'; |
|
| 53 | + $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.'route_list.php'; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if (is_file($filename)) { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $content = $this->getRouteList($app); |
| 63 | - file_put_contents($filename, 'Route List' . PHP_EOL . $content); |
|
| 63 | + file_put_contents($filename, 'Route List'.PHP_EOL.$content); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | protected function getRouteList(string $app = null): string |
@@ -69,16 +69,16 @@ discard block |
||
| 69 | 69 | $this->app->route->clear(); |
| 70 | 70 | |
| 71 | 71 | if ($app) { |
| 72 | - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR; |
|
| 72 | + $path = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR; |
|
| 73 | 73 | } else { |
| 74 | - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR; |
|
| 74 | + $path = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $files = is_dir($path) ? scandir($path) : []; |
| 78 | 78 | |
| 79 | 79 | foreach ($files as $file) { |
| 80 | 80 | if (strpos($file, '.php')) { |
| 81 | - include $path . $file; |
|
| 81 | + include $path.$file; |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $sort = $this->sortBy[$sort]; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - uasort($rows, function ($a, $b) use ($sort) { |
|
| 120 | + uasort($rows, function($a, $b) use ($sort) { |
|
| 121 | 121 | $itemA = $a[$sort] ?? null; |
| 122 | 122 | $itemB = $b[$sort] ?? null; |
| 123 | 123 | |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\console; |
| 14 | 14 | |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | ]; |
| 405 | 405 | $replacements = [ |
| 406 | 406 | $name, |
| 407 | - $_SERVER['PHP_SELF'] . ' ' . $name, |
|
| 407 | + $_SERVER['PHP_SELF'].' '.$name, |
|
| 408 | 408 | ]; |
| 409 | 409 | |
| 410 | 410 | return str_replace($placeholders, $replacements, $this->getHelp()); |
@@ -508,6 +508,6 @@ discard block |
||
| 508 | 508 | protected function isMultiApp(): bool |
| 509 | 509 | { |
| 510 | 510 | $autoMulti = $this->app->config->get('app.auto_multi_app', false); |
| 511 | - return $autoMulti || !is_dir($this->app->getBasePath() . 'controller'); |
|
| 511 | + return $autoMulti || !is_dir($this->app->getBasePath().'controller'); |
|
| 512 | 512 | } |
| 513 | 513 | } |
@@ -49,21 +49,21 @@ discard block |
||
| 49 | 49 | $tables = $this->app->db->getConnection()->getTables($dbName); |
| 50 | 50 | } else { |
| 51 | 51 | if ($app) { |
| 52 | - $appPath = $this->app->getBasePath() . $app . DIRECTORY_SEPARATOR; |
|
| 53 | - $namespace = 'app\\' . $app; |
|
| 52 | + $appPath = $this->app->getBasePath().$app.DIRECTORY_SEPARATOR; |
|
| 53 | + $namespace = 'app\\'.$app; |
|
| 54 | 54 | } else { |
| 55 | 55 | $appPath = $this->app->getBasePath(); |
| 56 | 56 | $namespace = 'app'; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $path = $appPath . 'model'; |
|
| 59 | + $path = $appPath.'model'; |
|
| 60 | 60 | $list = is_dir($path) ? scandir($path) : []; |
| 61 | 61 | |
| 62 | 62 | foreach ($list as $file) { |
| 63 | 63 | if (0 === strpos($file, '.')) { |
| 64 | 64 | continue; |
| 65 | 65 | } |
| 66 | - $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); |
|
| 66 | + $class = '\\'.$namespace.'\\model\\'.pathinfo($file, PATHINFO_FILENAME); |
|
| 67 | 67 | $this->buildModelSchema($class); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - $db = isset($dbName) ? $dbName . '.' : ''; |
|
| 74 | + $db = isset($dbName) ? $dbName.'.' : ''; |
|
| 75 | 75 | $this->buildDataBaseSchema($schemaPath, $tables, $db); |
| 76 | 76 | |
| 77 | 77 | $output->writeln('<info>Succeed!</info>'); |
@@ -90,27 +90,27 @@ discard block |
||
| 90 | 90 | if (!is_dir($path)) { |
| 91 | 91 | mkdir($path, 0755, true); |
| 92 | 92 | } |
| 93 | - $content = '<?php ' . PHP_EOL . 'return '; |
|
| 93 | + $content = '<?php '.PHP_EOL.'return '; |
|
| 94 | 94 | $info = $model->db()->getConnection()->getTableFieldsInfo($table); |
| 95 | - $content .= var_export($info, true) . ';'; |
|
| 95 | + $content .= var_export($info, true).';'; |
|
| 96 | 96 | |
| 97 | - file_put_contents($path . $dbName . '.' . $table . '.php', $content); |
|
| 97 | + file_put_contents($path.$dbName.'.'.$table.'.php', $content); |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | protected function buildDataBaseSchema(string $path, array $tables, string $db): void |
| 102 | 102 | { |
| 103 | 103 | if ('' == $db) { |
| 104 | - $dbName = $this->app->db->getConnection()->getConfig('database') . '.'; |
|
| 104 | + $dbName = $this->app->db->getConnection()->getConfig('database').'.'; |
|
| 105 | 105 | } else { |
| 106 | 106 | $dbName = $db; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | foreach ($tables as $table) { |
| 110 | - $content = '<?php ' . PHP_EOL . 'return '; |
|
| 111 | - $info = $this->app->db->getConnection()->getTableFieldsInfo($db . $table); |
|
| 112 | - $content .= var_export($info, true) . ';'; |
|
| 113 | - file_put_contents($path . $dbName . $table . '.php', $content); |
|
| 110 | + $content = '<?php '.PHP_EOL.'return '; |
|
| 111 | + $info = $this->app->db->getConnection()->getTableFieldsInfo($db.$table); |
|
| 112 | + $content .= var_export($info, true).';'; |
|
| 113 | + file_put_contents($path.$dbName.$table.'.php', $content); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: liu21st <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think\route; |
| 14 | 14 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $rule = '/' != $rule ? ltrim($rule, '/') : ''; |
| 135 | 135 | |
| 136 | 136 | if ($this->parent && $prefix = $this->parent->getFullName()) { |
| 137 | - $rule = $prefix . ($rule ? '/' . ltrim($rule, '/') : ''); |
|
| 137 | + $rule = $prefix.($rule ? '/'.ltrim($rule, '/') : ''); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if (false !== strpos($rule, ':')) { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | if (isset($option['ext'])) { |
| 239 | 239 | // 路由ext参数 优先于系统配置的URL伪静态后缀参数 |
| 240 | - $url = preg_replace('/\.(' . $request->ext() . ')$/i', '', $url); |
|
| 240 | + $url = preg_replace('/\.('.$request->ext().')$/i', '', $url); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | return $url; |
@@ -261,38 +261,38 @@ discard block |
||
| 261 | 261 | $pattern = array_merge($this->parent->getPattern(), $this->pattern); |
| 262 | 262 | |
| 263 | 263 | // 检查完整规则定义 |
| 264 | - if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^' . $pattern['__url__'] . ($completeMatch ? '$' : '') . '/', str_replace('|', $depr, $url))) { |
|
| 264 | + if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^'.$pattern['__url__'].($completeMatch ? '$' : '').'/', str_replace('|', $depr, $url))) { |
|
| 265 | 265 | return false; |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | $var = []; |
| 269 | - $url = $depr . str_replace('|', $depr, $url); |
|
| 270 | - $rule = $depr . str_replace('/', $depr, $this->rule); |
|
| 269 | + $url = $depr.str_replace('|', $depr, $url); |
|
| 270 | + $rule = $depr.str_replace('/', $depr, $this->rule); |
|
| 271 | 271 | |
| 272 | 272 | if ($depr == $rule && $depr != $url) { |
| 273 | 273 | return false; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | if (false === strpos($rule, '<')) { |
| 277 | - if (0 === strcasecmp($rule, $url) || (!$completeMatch && 0 === strncasecmp($rule . $depr, $url . $depr, strlen($rule . $depr)))) { |
|
| 277 | + if (0 === strcasecmp($rule, $url) || (!$completeMatch && 0 === strncasecmp($rule.$depr, $url.$depr, strlen($rule.$depr)))) { |
|
| 278 | 278 | return $var; |
| 279 | 279 | } |
| 280 | 280 | return false; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | - $slash = preg_quote('/-' . $depr, '/'); |
|
| 283 | + $slash = preg_quote('/-'.$depr, '/'); |
|
| 284 | 284 | |
| 285 | - if ($matchRule = preg_split('/[' . $slash . ']?<\w+\??>/', $rule, 2)) { |
|
| 285 | + if ($matchRule = preg_split('/['.$slash.']?<\w+\??>/', $rule, 2)) { |
|
| 286 | 286 | if ($matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))) { |
| 287 | 287 | return false; |
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - if (preg_match_all('/[' . $slash . ']?<?\w+\??>?/', $rule, $matches)) { |
|
| 291 | + if (preg_match_all('/['.$slash.']?<?\w+\??>?/', $rule, $matches)) { |
|
| 292 | 292 | $regex = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $completeMatch); |
| 293 | 293 | |
| 294 | 294 | try { |
| 295 | - if (!preg_match('/^' . $regex . '/u', $url, $match)) { |
|
| 295 | + if (!preg_match('/^'.$regex.'/u', $url, $match)) { |
|
| 296 | 296 | return false; |
| 297 | 297 | } |
| 298 | 298 | } catch (\Exception $e) { |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // +---------------------------------------------------------------------- |
| 9 | 9 | // | Author: yunwuxin <[email protected]> |
| 10 | 10 | // +---------------------------------------------------------------------- |
| 11 | -declare (strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace think; |
| 14 | 14 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | public function getConfig(string $name = null, $default = null) |
| 57 | 57 | { |
| 58 | 58 | if (!is_null($name)) { |
| 59 | - return $this->app->config->get('filesystem.' . $name, $default); |
|
| 59 | + return $this->app->config->get('filesystem.'.$name, $default); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return $this->app->config->get('filesystem'); |