@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function handle($request, Closure $next) |
17 | 17 | { |
18 | - if($this->alreadyInstalled() || !config('kleis.installer')) { |
|
18 | + if ($this->alreadyInstalled() || !config('kleis.installer')) { |
|
19 | 19 | return redirect('/'); |
20 | 20 | } |
21 | 21 |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | $data = $request->session()->all(); |
37 | 37 | |
38 | 38 | $env = ''; |
39 | - foreach($data as $key => $value) { |
|
40 | - if(preg_match('/^[A-Z]+_[A-Z]+$/', $key)) { |
|
41 | - $env .= "${key}=${value}" . PHP_EOL; |
|
39 | + foreach ($data as $key => $value) { |
|
40 | + if (preg_match('/^[A-Z]+_[A-Z]+$/', $key)) { |
|
41 | + $env .= "${key}=${value}".PHP_EOL; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | try { |
60 | 60 | file_put_contents($this->envPath, $request->get('envConfig')); |
61 | - } catch(Exception $e) { |
|
61 | + } catch (Exception $e) { |
|
62 | 62 | $status = false; |
63 | 63 | } |
64 | 64 |
@@ -15,11 +15,11 @@ |
||
15 | 15 | { |
16 | 16 | $results = []; |
17 | 17 | |
18 | - foreach($requirements as $requirement) |
|
18 | + foreach ($requirements as $requirement) |
|
19 | 19 | { |
20 | 20 | $results['requirements'][$requirement] = true; |
21 | 21 | |
22 | - if(!extension_loaded($requirement)) |
|
22 | + if (!extension_loaded($requirement)) |
|
23 | 23 | { |
24 | 24 | $results['requirements'][$requirement] = false; |
25 | 25 |
@@ -29,9 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | public function check(array $folders) |
31 | 31 | { |
32 | - foreach($folders as $folder => $permission) |
|
32 | + foreach ($folders as $folder => $permission) |
|
33 | 33 | { |
34 | - if(!($this->getPermission($folder) >= $permission)) |
|
34 | + if (!($this->getPermission($folder) >= $permission)) |
|
35 | 35 | { |
36 | 36 | $this->addFileAndSetErrors($folder, $permission, false); |
37 | 37 | } |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | */ |
30 | 30 | private function migrate() |
31 | 31 | { |
32 | - try{ |
|
33 | - Artisan::call('migrate', ["--force"=> true ]); |
|
32 | + try { |
|
33 | + Artisan::call('migrate', ["--force"=> true]); |
|
34 | 34 | } |
35 | - catch(Exception $e){ |
|
35 | + catch (Exception $e) { |
|
36 | 36 | return $this->response($e->getMessage()); |
37 | 37 | } |
38 | 38 | |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | */ |
47 | 47 | private function seed() |
48 | 48 | { |
49 | - try{ |
|
49 | + try { |
|
50 | 50 | Artisan::call('db:seed'); |
51 | 51 | } |
52 | - catch(Exception $e){ |
|
52 | + catch (Exception $e) { |
|
53 | 53 | return $this->response($e->getMessage()); |
54 | 54 | } |
55 | 55 | |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | */ |
77 | 77 | private function sqlite() |
78 | 78 | { |
79 | - if(DB::connection() instanceof SQLiteConnection) { |
|
79 | + if (DB::connection() instanceof SQLiteConnection) { |
|
80 | 80 | $database = DB::connection()->getDatabaseName(); |
81 | - if(!file_exists($database)) { |
|
81 | + if (!file_exists($database)) { |
|
82 | 82 | touch($database); |
83 | 83 | DB::reconnect(Config::get('database.default')); |
84 | 84 | } |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | - if(!empty($request->announce)) { |
|
133 | + if (!empty($request->announce)) { |
|
134 | 134 | $filename = 'announce.md'; |
135 | 135 | $mdfile = public_path("markdown/{$filename}"); |
136 | 136 | try { |
137 | 137 | file_put_contents($mdfile, $request->announce); |
138 | - } catch(Exception $e) { |
|
138 | + } catch (Exception $e) { |
|
139 | 139 | return $redirect->route('KleisInstaller::stepCustomization') |
140 | 140 | ->withInput(); |
141 | 141 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | $status = $environmentManager->saveFile($request); |
171 | 171 | |
172 | - if($status) { |
|
172 | + if ($status) { |
|
173 | 173 | return $redirect->route('KleisInstaller::stepRequirements') |
174 | 174 | ->with(['message' => session('message')]); |
175 | 175 | } else { |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | public function search(&$entities, $type = null, $search = null) |
11 | 11 | { |
12 | - $reflection = new ReflectionProperty($entities, 'model'); |
|
12 | + $reflection = new ReflectionProperty($entities, 'model'); |
|
13 | 13 | $reflection->setAccessible(true); |
14 | 14 | $classname = $reflection->getValue($entities); |
15 | 15 | |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | $criteria = explode(' ', $search); |
21 | 21 | $columns = $classname::SEARCH_CRITERIA[$type]; |
22 | 22 | |
23 | - $entities = $entities->where( function($q) use ($columns, $criteria) { |
|
23 | + $entities = $entities->where(function($q) use ($columns, $criteria) { |
|
24 | 24 | foreach ($columns as $column) { |
25 | 25 | if (is_array($column)) { |
26 | 26 | $relation = $column; |
27 | - foreach($relation as $table => $column) { |
|
27 | + foreach ($relation as $table => $column) { |
|
28 | 28 | $q->whereHas($table, |
29 | 29 | function($query) use ($column, $criteria) { |
30 | - foreach($criteria as $value) { |
|
30 | + foreach ($criteria as $value) { |
|
31 | 31 | $query->orWhere($column, 'LIKE', $value); |
32 | 32 | } |
33 | 33 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } else { |
37 | 37 | $q->orWhere( |
38 | 38 | function($query) use ($column, $criteria) { |
39 | - foreach($criteria as $value) { |
|
39 | + foreach ($criteria as $value) { |
|
40 | 40 | $query->orWhere($column, 'LIKE', $value); |
41 | 41 | } |
42 | 42 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $router->group([ |
56 | 56 | 'namespace' => $this->namespace, 'middleware' => 'web', |
57 | - ], function ($router) { |
|
57 | + ], function($router) { |
|
58 | 58 | require app_path('Http/routes.php'); |
59 | 59 | }); |
60 | 60 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | |
14 | -Route::group(['middleware' => 'installed'], function () { |
|
14 | +Route::group(['middleware' => 'installed'], function() { |
|
15 | 15 | |
16 | 16 | Route::auth(); |
17 | 17 |