@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('users', function (Blueprint $table) { |
|
16 | + Schema::create('users', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('email')->unique(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('password_resets', function (Blueprint $table) { |
|
16 | + Schema::create('password_resets', function(Blueprint $table) { |
|
17 | 17 | $table->string('email')->index(); |
18 | 18 | $table->string('token'); |
19 | 19 | $table->timestamp('created_at')->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -$factory->define(App\User::class, function (Faker $faker) { |
|
16 | +$factory->define(App\User::class, function(Faker $faker) { |
|
17 | 17 | return [ |
18 | 18 | 'name' => $faker->name, |
19 | 19 | 'email' => $faker->unique()->safeEmail, |
@@ -38,7 +38,7 @@ |
||
38 | 38 | final public function up() |
39 | 39 | { |
40 | 40 | if (!Schema::connection($this->connection)->hasTable($this->collection)) { |
41 | - Schema::connection($this->connection)->create($this->collection, function (Blueprint $collection) { |
|
41 | + Schema::connection($this->connection)->create($this->collection, function(Blueprint $collection) { |
|
42 | 42 | $this->migrate($collection); |
43 | 43 | }); |
44 | 44 | } |
@@ -11,6 +11,6 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | |
14 | -Route::prefix('user')->group(function () { |
|
14 | +Route::prefix('user')->group(function() { |
|
15 | 15 | Route::get('/', 'UserController@index'); |
16 | 16 | }); |
@@ -141,6 +141,6 @@ |
||
141 | 141 | | |
142 | 142 | */ |
143 | 143 | |
144 | - 'attributes' => [], |
|
144 | + 'attributes' => [ ], |
|
145 | 145 | |
146 | 146 | ]; |
@@ -13,6 +13,6 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -Route::middleware('auth:api')->get('/user', function (Request $request) { |
|
16 | +Route::middleware('auth:api')->get('/user', function(Request $request) { |
|
17 | 17 | return $request->user(); |
18 | 18 | }); |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | $sourcePath => $viewPath, |
69 | 69 | ], 'views'); |
70 | 70 | |
71 | - $this->loadViewsFrom(array_merge(array_map(function ($path) { |
|
72 | - return $path . '/modules/user'; |
|
73 | - }, \Config::get('view.paths')), [$sourcePath]), 'user'); |
|
71 | + $this->loadViewsFrom(array_merge(array_map(function($path) { |
|
72 | + return $path.'/modules/user'; |
|
73 | + }, \Config::get('view.paths')), [ $sourcePath ]), 'user'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -108,6 +108,6 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function provides() |
110 | 110 | { |
111 | - return []; |
|
111 | + return [ ]; |
|
112 | 112 | } |
113 | 113 | } |
@@ -36,23 +36,23 @@ discard block |
||
36 | 36 | |
37 | 37 | public function scanDirectories(): array |
38 | 38 | { |
39 | - $bootstrap = []; |
|
39 | + $bootstrap = [ ]; |
|
40 | 40 | $modules = \Module::all(); |
41 | 41 | |
42 | 42 | foreach ($modules as $module) { |
43 | 43 | foreach ($this->moduleEntityDirectories as $directory) { |
44 | 44 | $directory = ucfirst($directory); |
45 | - $directoryPath = $module->getPath() . '/' . $directory; |
|
46 | - $namespace = 'Modules' . '\\' . $module->getName(); |
|
45 | + $directoryPath = $module->getPath().'/'.$directory; |
|
46 | + $namespace = 'Modules'.'\\'.$module->getName(); |
|
47 | 47 | if (file_exists($directoryPath)) { |
48 | 48 | $files = scandir($directoryPath); |
49 | 49 | foreach ($files as $fileName) { |
50 | 50 | if ($this->isPhpFile($fileName)) { |
51 | 51 | $className = basename($fileName, '.php'); |
52 | - $class = $namespace . '\\' . $directory . '\\' . $className; |
|
52 | + $class = $namespace.'\\'.$directory.'\\'.$className; |
|
53 | 53 | try { |
54 | 54 | if (new $class() instanceof Command) { |
55 | - $bootstrap['commands'][] = $class; |
|
55 | + $bootstrap[ 'commands' ][ ] = $class; |
|
56 | 56 | } |
57 | 57 | } catch (\Exception $e) { |
58 | 58 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | private function isPhpFile(string $fileName): bool |
69 | 69 | { |
70 | - return strlen($fileName) > 5 && '.php' === ($fileName[-4] . $fileName[-3] . $fileName[-2] . $fileName[-1]); |
|
70 | + return strlen($fileName) > 5 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | private function loadBootstrapFromCache() |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | |
83 | 83 | public function getCommands(): array |
84 | 84 | { |
85 | - return $this->loadBootstrapFromCache()['commands']; |
|
85 | + return $this->loadBootstrapFromCache()[ 'commands' ]; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | public function getCachePath(): string |
89 | 89 | { |
90 | - return app()->bootstrapPath() . '/cache/' . $this->cacheFile; |
|
90 | + return app()->bootstrapPath().'/cache/'.$this->cacheFile; |
|
91 | 91 | } |
92 | 92 | } |