@@ -26,6 +26,6 @@ |
||
26 | 26 | |
27 | 27 | protected function execute(Input $input, Output $output) |
28 | 28 | { |
29 | - $output->writeln('v' . App::version()); |
|
29 | + $output->writeln('v'.App::version()); |
|
30 | 30 | } |
31 | 31 | } |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | |
40 | 40 | protected function execute(Input $input, Output $output) |
41 | 41 | { |
42 | - $filename = Container::get('app')->getRuntimePath() . 'route_list.php'; |
|
42 | + $filename = Container::get('app')->getRuntimePath().'route_list.php'; |
|
43 | 43 | |
44 | 44 | if (is_file($filename)) { |
45 | 45 | unlink($filename); |
46 | 46 | } |
47 | 47 | |
48 | 48 | $content = $this->getRouteList(); |
49 | - file_put_contents($filename, 'Route List' . PHP_EOL . $content); |
|
49 | + file_put_contents($filename, 'Route List'.PHP_EOL.$content); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | protected function getRouteList() |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | foreach ($files as $file) { |
61 | 61 | if (strpos($file, '.php')) { |
62 | - $filename = $path . DIRECTORY_SEPARATOR . $file; |
|
62 | + $filename = $path.DIRECTORY_SEPARATOR.$file; |
|
63 | 63 | // 导入路由配置 |
64 | 64 | $rules = include $filename; |
65 | 65 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $sort = $this->sortBy[$sort]; |
110 | 110 | } |
111 | 111 | |
112 | - uasort($rows, function ($a, $b) use ($sort) { |
|
112 | + uasort($rows, function($a, $b) use ($sort) { |
|
113 | 113 | $itemA = isset($a[$sort]) ? $a[$sort] : null; |
114 | 114 | $itemB = isset($b[$sort]) ? $b[$sort] : null; |
115 | 115 |
@@ -26,11 +26,11 @@ |
||
26 | 26 | |
27 | 27 | protected function getStub() |
28 | 28 | { |
29 | - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'middleware.stub'; |
|
29 | + return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'middleware.stub'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function getNamespace($appNamespace, $module) |
33 | 33 | { |
34 | - return parent::getNamespace($appNamespace, 'http') . '\middleware'; |
|
34 | + return parent::getNamespace($appNamespace, 'http').'\middleware'; |
|
35 | 35 | } |
36 | 36 | } |
@@ -26,14 +26,14 @@ |
||
26 | 26 | |
27 | 27 | protected function getStub() |
28 | 28 | { |
29 | - $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; |
|
29 | + $stubPath = __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR; |
|
30 | 30 | |
31 | - return $stubPath . 'validate.stub'; |
|
31 | + return $stubPath.'validate.stub'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | protected function getNamespace($appNamespace, $module) |
35 | 35 | { |
36 | - return parent::getNamespace($appNamespace, $module) . '\validate'; |
|
36 | + return parent::getNamespace($appNamespace, $module).'\validate'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
@@ -26,11 +26,11 @@ |
||
26 | 26 | |
27 | 27 | protected function getStub() |
28 | 28 | { |
29 | - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'model.stub'; |
|
29 | + return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'model.stub'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function getNamespace($appNamespace, $module) |
33 | 33 | { |
34 | - return parent::getNamespace($appNamespace, $module) . '\model'; |
|
34 | + return parent::getNamespace($appNamespace, $module).'\model'; |
|
35 | 35 | } |
36 | 36 | } |
@@ -30,27 +30,27 @@ |
||
30 | 30 | |
31 | 31 | protected function getStub() |
32 | 32 | { |
33 | - $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; |
|
33 | + $stubPath = __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR; |
|
34 | 34 | |
35 | 35 | if ($this->input->getOption('api')) { |
36 | - return $stubPath . 'controller.api.stub'; |
|
36 | + return $stubPath.'controller.api.stub'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | if ($this->input->getOption('plain')) { |
40 | - return $stubPath . 'controller.plain.stub'; |
|
40 | + return $stubPath.'controller.plain.stub'; |
|
41 | 41 | } |
42 | 42 | |
43 | - return $stubPath . 'controller.stub'; |
|
43 | + return $stubPath.'controller.stub'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | protected function getClassName($name) |
47 | 47 | { |
48 | - return parent::getClassName($name) . (Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : ''); |
|
48 | + return parent::getClassName($name).(Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : ''); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | protected function getNamespace($appNamespace, $module) |
52 | 52 | { |
53 | - return parent::getNamespace($appNamespace, $module) . '\controller'; |
|
53 | + return parent::getNamespace($appNamespace, $module).'\controller'; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $commandName = $this->input->getArgument('commandName') ?: strtolower(basename($name)); |
33 | 33 | $namespace = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); |
34 | 34 | |
35 | - $class = str_replace($namespace . '\\', '', $name); |
|
35 | + $class = str_replace($namespace.'\\', '', $name); |
|
36 | 36 | $stub = file_get_contents($this->getStub()); |
37 | 37 | |
38 | 38 | return str_replace(['{%commandName%}', '{%className%}', '{%namespace%}', '{%app_namespace%}'], [ |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | |
46 | 46 | protected function getStub() |
47 | 47 | { |
48 | - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'command.stub'; |
|
48 | + return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'command.stub'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | protected function getNamespace($appNamespace, $module) |
52 | 52 | { |
53 | - return $appNamespace . '\\command'; |
|
53 | + return $appNamespace.'\\command'; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | if ($input->hasOption('config')) { |
45 | 45 | $build = include $input->getOption('config'); |
46 | 46 | } else { |
47 | - $build = include App::getAppPath() . 'build.php'; |
|
47 | + $build = include App::getAppPath().'build.php'; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if (empty($build)) { |
@@ -356,11 +356,11 @@ |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | foreach ($this->getArguments() as $argument) { |
359 | - $element = '<' . $argument->getName() . '>'; |
|
359 | + $element = '<'.$argument->getName().'>'; |
|
360 | 360 | if (!$argument->isRequired()) { |
361 | - $element = '[' . $element . ']'; |
|
361 | + $element = '['.$element.']'; |
|
362 | 362 | } elseif ($argument->isArray()) { |
363 | - $element .= ' (' . $element . ')'; |
|
363 | + $element .= ' ('.$element.')'; |
|
364 | 364 | } |
365 | 365 | |
366 | 366 | if ($argument->isArray()) { |