@@ -283,7 +283,6 @@ |
||
283 | 283 | |
284 | 284 | /** |
285 | 285 | * validateDBInfo |
286 | - |
|
287 | 286 | * @param $dbInfo |
288 | 287 | * |
289 | 288 | * @return bool |
@@ -490,8 +490,8 @@ discard block |
||
490 | 490 | /** |
491 | 491 | * setEnv |
492 | 492 | * |
493 | - * @param $key |
|
494 | - * @param $newValue |
|
493 | + * @param string $key |
|
494 | + * @param string $newValue |
|
495 | 495 | * @param string $defaultValue |
496 | 496 | * |
497 | 497 | * @return void |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | /** |
606 | 606 | * basePath |
607 | 607 | * |
608 | - * @param null $path |
|
608 | + * @param string $path |
|
609 | 609 | * |
610 | 610 | * @return string |
611 | 611 | */ |
@@ -133,9 +133,9 @@ discard block |
||
133 | 133 | } catch (\Exception $e) { |
134 | 134 | $err = [ |
135 | 135 | 'Install fail!! Try again.', |
136 | - ' message: ' . $e->getMessage(), |
|
137 | - ' file: ' . $e->getFile(), |
|
138 | - ' line: ' . $e->getLine(), |
|
136 | + ' message: '.$e->getMessage(), |
|
137 | + ' file: '.$e->getFile(), |
|
138 | + ' line: '.$e->getLine(), |
|
139 | 139 | ]; |
140 | 140 | $this->output->error(implode(PHP_EOL, $err)); |
141 | 141 | $note = [ |
@@ -329,13 +329,13 @@ discard block |
||
329 | 329 | try { |
330 | 330 | $this->setStorageDirPermission(); |
331 | 331 | } catch (\Exception $e) { |
332 | - $this->error('Fail to change storage directory permission. Check directory after install.' . PHP_EOL . ' message: '. $e->getMessage()); |
|
332 | + $this->error('Fail to change storage directory permission. Check directory after install.'.PHP_EOL.' message: '.$e->getMessage()); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | try { |
336 | 336 | $this->setBootCacheDirPermission(); |
337 | 337 | } catch (\Exception $e) { |
338 | - $this->error('Fail to change bootstrap cache directory permission. Check directory after install.' . PHP_EOL . ' message: '. $e->getMessage()); |
|
338 | + $this->error('Fail to change bootstrap cache directory permission. Check directory after install.'.PHP_EOL.' message: '.$e->getMessage()); |
|
339 | 339 | } |
340 | 340 | } |
341 | 341 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | . PHP_EOL |
352 | 352 | . 'Your personal information will not be collected.' |
353 | 353 | ); |
354 | - $answer = $this->askValidation('Do you agree to collect your system environmental information?', 'yes', function ($value) { |
|
354 | + $answer = $this->askValidation('Do you agree to collect your system environmental information?', 'yes', function($value) { |
|
355 | 355 | if (!in_array($value, ['yes', 'no'])) { |
356 | 356 | throw new \Exception('Input only yes or no.'); |
357 | 357 | } |
@@ -488,13 +488,13 @@ discard block |
||
488 | 488 | */ |
489 | 489 | private function configFileGenerate($key, array $data) |
490 | 490 | { |
491 | - $dir = config_path() . '/cms'; |
|
491 | + $dir = config_path().'/cms'; |
|
492 | 492 | $this->makeDir($dir); |
493 | 493 | |
494 | 494 | $data = $this->encodeArr2Str($data); |
495 | 495 | |
496 | - $file = $dir . "/{$key}.php"; |
|
497 | - file_put_contents($file, '<?php' . str_repeat(PHP_EOL, 2) . 'return [' . PHP_EOL . $data . '];' . PHP_EOL); |
|
496 | + $file = $dir."/{$key}.php"; |
|
497 | + file_put_contents($file, '<?php'.str_repeat(PHP_EOL, 2).'return ['.PHP_EOL.$data.'];'.PHP_EOL); |
|
498 | 498 | } |
499 | 499 | |
500 | 500 | /** |
@@ -527,9 +527,9 @@ discard block |
||
527 | 527 | |
528 | 528 | foreach ($arr as $key => $val) { |
529 | 529 | if (is_array($val)) { |
530 | - $output .= $this->getIndent($depth) . "'{$key}' => " . '[' . PHP_EOL . $this->encodeArr2Str($val, $depth + 1) . $this->getIndent($depth) . '],' . PHP_EOL; |
|
530 | + $output .= $this->getIndent($depth)."'{$key}' => ".'['.PHP_EOL.$this->encodeArr2Str($val, $depth + 1).$this->getIndent($depth).'],'.PHP_EOL; |
|
531 | 531 | } else { |
532 | - $output .= $this->getIndent($depth) . "'{$key}' => " . (is_int($val) ? $val : "'{$val}'") .',' . PHP_EOL; |
|
532 | + $output .= $this->getIndent($depth)."'{$key}' => ".(is_int($val) ? $val : "'{$val}'").','.PHP_EOL; |
|
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $siteInfo = $this->defaultInfos['site']; |
584 | 584 | |
585 | 585 | // site url |
586 | - $siteInfo['url'] = $this->askValidation('site url', $siteInfo['url'], function ($url) { |
|
586 | + $siteInfo['url'] = $this->askValidation('site url', $siteInfo['url'], function($url) { |
|
587 | 587 | $url = trim($url, "/"); |
588 | 588 | if (filter_var($url, FILTER_VALIDATE_URL) === false) { |
589 | 589 | throw new \Exception('Invalid URL Format.'); |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | }); |
593 | 593 | |
594 | 594 | // timezone |
595 | - $siteInfo['timezone'] = $this->askValidation('Timezone', $siteInfo['timezone'], function ($timezone) { |
|
595 | + $siteInfo['timezone'] = $this->askValidation('Timezone', $siteInfo['timezone'], function($timezone) { |
|
596 | 596 | if (in_array($timezone, timezone_identifiers_list()) === false) { |
597 | 597 | throw new \Exception('Inputted timezone do not exist.'); |
598 | 598 | } |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | $process = new Process(implode(' && ', $commands), $this->getBasePath(), null, null, null); |
764 | 764 | |
765 | 765 | $process->run( |
766 | - function ($type, $line) { |
|
766 | + function($type, $line) { |
|
767 | 767 | $this->line($line); |
768 | 768 | } |
769 | 769 | ); |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | $adminInfo = $this->defaultInfos['admin']; |
809 | 809 | |
810 | 810 | |
811 | - $adminInfo['email'] = $this->askValidation('Email', $adminInfo['email'], function ($email) { |
|
811 | + $adminInfo['email'] = $this->askValidation('Email', $adminInfo['email'], function($email) { |
|
812 | 812 | $validate = \Validator::make( |
813 | 813 | ['email' => $email], |
814 | 814 | [ |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | }); |
823 | 823 | |
824 | 824 | // displayName |
825 | - $adminInfo['displayName'] = $this->askValidation('Name', $adminInfo['displayName'], function ($displayName) { |
|
825 | + $adminInfo['displayName'] = $this->askValidation('Name', $adminInfo['displayName'], function($displayName) { |
|
826 | 826 | if (strlen(trim($displayName)) === 0) { |
827 | 827 | throw new \Exception('Input Name'); |
828 | 828 | } |
@@ -2,5 +2,5 @@ |
||
2 | 2 | |
3 | 3 | abstract class Event |
4 | 4 | { |
5 | - // |
|
5 | + // |
|
6 | 6 | } |
@@ -9,5 +9,5 @@ |
||
9 | 9 | |
10 | 10 | abstract class Controller extends BaseController |
11 | 11 | { |
12 | - use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|
12 | + use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|
13 | 13 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | if (strstr($type, '/')) { |
16 | 16 | $pos = strrpos($type, '/'); |
17 | - $instanceId = substr($type, $pos+1); |
|
17 | + $instanceId = substr($type, $pos + 1); |
|
18 | 18 | $type = substr($type, 0, $pos); |
19 | 19 | } else { |
20 | 20 | $instanceId = null; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | class WelcomeController extends Controller { |
4 | 4 | |
5 | - /* |
|
5 | + /* |
|
6 | 6 | |-------------------------------------------------------------------------- |
7 | 7 | | Welcome Controller |
8 | 8 | |-------------------------------------------------------------------------- |
@@ -13,24 +13,24 @@ discard block |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | - /** |
|
17 | - * Create a new controller instance. |
|
18 | - * |
|
19 | - * @return void |
|
20 | - */ |
|
21 | - public function __construct() |
|
22 | - { |
|
23 | - $this->middleware('guest'); |
|
24 | - } |
|
16 | + /** |
|
17 | + * Create a new controller instance. |
|
18 | + * |
|
19 | + * @return void |
|
20 | + */ |
|
21 | + public function __construct() |
|
22 | + { |
|
23 | + $this->middleware('guest'); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * Show the application welcome screen to the user. |
|
28 | - * |
|
29 | - * @return Response |
|
30 | - */ |
|
31 | - public function index() |
|
32 | - { |
|
33 | - return view('welcome'); |
|
34 | - } |
|
26 | + /** |
|
27 | + * Show the application welcome screen to the user. |
|
28 | + * |
|
29 | + * @return Response |
|
30 | + */ |
|
31 | + public function index() |
|
32 | + { |
|
33 | + return view('welcome'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | } |
@@ -7,41 +7,41 @@ |
||
7 | 7 | |
8 | 8 | class Authenticate |
9 | 9 | { |
10 | - /** |
|
11 | - * The Guard implementation. |
|
12 | - * |
|
13 | - * @var Guard |
|
14 | - */ |
|
15 | - protected $auth; |
|
10 | + /** |
|
11 | + * The Guard implementation. |
|
12 | + * |
|
13 | + * @var Guard |
|
14 | + */ |
|
15 | + protected $auth; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Create a new filter instance. |
|
19 | - * |
|
20 | - * @param Guard $auth |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function __construct(Guard $auth) |
|
24 | - { |
|
25 | - $this->auth = $auth; |
|
26 | - } |
|
17 | + /** |
|
18 | + * Create a new filter instance. |
|
19 | + * |
|
20 | + * @param Guard $auth |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function __construct(Guard $auth) |
|
24 | + { |
|
25 | + $this->auth = $auth; |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * Handle an incoming request. |
|
30 | - * |
|
31 | - * @param \Illuminate\Http\Request $request |
|
32 | - * @param \Closure $next |
|
33 | - * @return mixed |
|
34 | - */ |
|
35 | - public function handle($request, Closure $next) |
|
36 | - { |
|
37 | - if ($this->auth->guest()) { |
|
38 | - if ($request->ajax()) { |
|
39 | - return response('Unauthorized.', 401); |
|
40 | - } else { |
|
41 | - return redirect()->guest('auth/login'); |
|
42 | - } |
|
43 | - } |
|
28 | + /** |
|
29 | + * Handle an incoming request. |
|
30 | + * |
|
31 | + * @param \Illuminate\Http\Request $request |
|
32 | + * @param \Closure $next |
|
33 | + * @return mixed |
|
34 | + */ |
|
35 | + public function handle($request, Closure $next) |
|
36 | + { |
|
37 | + if ($this->auth->guest()) { |
|
38 | + if ($request->ajax()) { |
|
39 | + return response('Unauthorized.', 401); |
|
40 | + } else { |
|
41 | + return redirect()->guest('auth/login'); |
|
42 | + } |
|
43 | + } |
|
44 | 44 | |
45 | - return $next($request); |
|
46 | - } |
|
45 | + return $next($request); |
|
46 | + } |
|
47 | 47 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | protected function execute($input) |
27 | 27 | { |
28 | 28 | if (is_array($input) === true) { |
29 | - return array_map(function ($item) { |
|
29 | + return array_map(function($item) { |
|
30 | 30 | return $this->execute($item); |
31 | 31 | }, $input); |
32 | 32 | } |
@@ -7,37 +7,37 @@ |
||
7 | 7 | |
8 | 8 | class RedirectIfAuthenticated |
9 | 9 | { |
10 | - /** |
|
11 | - * The Guard implementation. |
|
12 | - * |
|
13 | - * @var Guard |
|
14 | - */ |
|
15 | - protected $auth; |
|
10 | + /** |
|
11 | + * The Guard implementation. |
|
12 | + * |
|
13 | + * @var Guard |
|
14 | + */ |
|
15 | + protected $auth; |
|
16 | 16 | |
17 | - /** |
|
18 | - * Create a new filter instance. |
|
19 | - * |
|
20 | - * @param Guard $auth |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function __construct(Guard $auth) |
|
24 | - { |
|
25 | - $this->auth = $auth; |
|
26 | - } |
|
17 | + /** |
|
18 | + * Create a new filter instance. |
|
19 | + * |
|
20 | + * @param Guard $auth |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function __construct(Guard $auth) |
|
24 | + { |
|
25 | + $this->auth = $auth; |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * Handle an incoming request. |
|
30 | - * |
|
31 | - * @param \Illuminate\Http\Request $request |
|
32 | - * @param \Closure $next |
|
33 | - * @return mixed |
|
34 | - */ |
|
35 | - public function handle($request, Closure $next) |
|
36 | - { |
|
37 | - if ($this->auth->check()) { |
|
38 | - return redirect('/'); |
|
39 | - } |
|
28 | + /** |
|
29 | + * Handle an incoming request. |
|
30 | + * |
|
31 | + * @param \Illuminate\Http\Request $request |
|
32 | + * @param \Closure $next |
|
33 | + * @return mixed |
|
34 | + */ |
|
35 | + public function handle($request, Closure $next) |
|
36 | + { |
|
37 | + if ($this->auth->check()) { |
|
38 | + return redirect('/'); |
|
39 | + } |
|
40 | 40 | |
41 | - return $next($request); |
|
42 | - } |
|
41 | + return $next($request); |
|
42 | + } |
|
43 | 43 | } |
@@ -6,23 +6,23 @@ |
||
6 | 6 | |
7 | 7 | class AppServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | - /** |
|
10 | - * Bootstrap any application services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - // |
|
17 | - } |
|
9 | + /** |
|
10 | + * Bootstrap any application services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + // |
|
17 | + } |
|
18 | 18 | |
19 | - /** |
|
20 | - * Register any application services. |
|
21 | - * |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - public function register() |
|
25 | - { |
|
26 | - // |
|
27 | - } |
|
19 | + /** |
|
20 | + * Register any application services. |
|
21 | + * |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + public function register() |
|
25 | + { |
|
26 | + // |
|
27 | + } |
|
28 | 28 | } |