@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('organizations', function (Blueprint $table) { |
|
16 | + Schema::create('organizations', function(Blueprint $table) { |
|
17 | 17 | $table->increments('organization_id'); |
18 | 18 | $table->string('name')->unique(); |
19 | 19 | $table->timestamps(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up() |
13 | 13 | { |
14 | - Schema::create('users', function (Blueprint $table) { |
|
14 | + Schema::create('users', function(Blueprint $table) { |
|
15 | 15 | $table->unsignedInteger('user_id'); |
16 | 16 | $table->unsignedInteger('organization_id'); |
17 | 17 | $table->primary(['user_id', 'organization_id']); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up() |
13 | 13 | { |
14 | - Schema::create('binary_users', function (Blueprint $table) { |
|
14 | + Schema::create('binary_users', function(Blueprint $table) { |
|
15 | 15 | $table->binary('user_id'); |
16 | 16 | $table->unsignedInteger('organization_id'); |
17 | 17 | $table->primary(['user_id', 'organization_id']); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('non_composite_users', function (Blueprint $table) { |
|
16 | + Schema::create('non_composite_users', function(Blueprint $table) { |
|
17 | 17 | $table->increments('user_id'); |
18 | 18 | $table->unsignedInteger('organization_id'); |
19 | 19 | $table->string('name')->unique(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | protected function getEnvironmentSetUp($app) |
12 | 12 | { |
13 | 13 | $app['config']->set('database.default', 'testing'); |
14 | - $app['router']->get('binary-users/{binaryUser}', function (TestBinaryUser $binaryUser) { |
|
14 | + $app['router']->get('binary-users/{binaryUser}', function(TestBinaryUser $binaryUser) { |
|
15 | 15 | return $binaryUser->toJson(); |
16 | 16 | })->middleware(SubstituteBindings::class); |
17 | 17 | } |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if ($this->hasCompositeIndex()) { |
164 | - $query->where(function ($query) use ($keys, $ids, $inverse) { |
|
164 | + $query->where(function($query) use ($keys, $ids, $inverse) { |
|
165 | 165 | foreach ($ids as $compositeKey) { |
166 | 166 | // try to parse normalized key |
167 | 167 | if (!is_array($compositeKey)) { |
168 | 168 | $compositeKey = $this->parseNormalizedKey($compositeKey); |
169 | 169 | } |
170 | 170 | |
171 | - $queryWriter = function ($query) use ($keys, $compositeKey, $inverse) { |
|
171 | + $queryWriter = function($query) use ($keys, $compositeKey, $inverse) { |
|
172 | 172 | /* |
173 | 173 | * @var \Illuminate\Database\Query\Builder $query |
174 | 174 | */ |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | return $this->newQueryWithoutScopes()->applyIds( |
262 | 262 | array_map( |
263 | - function ($normalizedKey) { |
|
263 | + function($normalizedKey) { |
|
264 | 264 | return $this->parseNormalizedKey($normalizedKey); |
265 | 265 | }, |
266 | 266 | $ids |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | if (env('DEBUG_QUERY_LOG', true)) { |
28 | 28 | \DB::listen( |
29 | - function (QueryExecuted $queryExecuted) { |
|
29 | + function(QueryExecuted $queryExecuted) { |
|
30 | 30 | var_dump($queryExecuted->sql); |
31 | 31 | var_dump($queryExecuted->bindings); |
32 | 32 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | protected function loadMigrationsFrom($paths) |
48 | 48 | { |
49 | 49 | $paths = (is_array($paths)) ? $paths : [$paths]; |
50 | - $this->app->afterResolving('migrator', function ($migrator) use ($paths) { |
|
50 | + $this->app->afterResolving('migrator', function($migrator) use ($paths) { |
|
51 | 51 | foreach ((array) $paths as $path) { |
52 | 52 | $migrator->path($path); |
53 | 53 | } |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | protected function getEnvironmentSetUp($app) |
12 | 12 | { |
13 | 13 | $app['config']->set('database.default', 'testing'); |
14 | - $app['router']->get('non-composite-users/{testUserNonComposite}', function (TestUserNonComposite $testUserNonComposite) { |
|
15 | - return $testUserNonComposite->setHidden(['created_at','updated_at'])->toJson(); |
|
14 | + $app['router']->get('non-composite-users/{testUserNonComposite}', function(TestUserNonComposite $testUserNonComposite) { |
|
15 | + return $testUserNonComposite->setHidden(['created_at', 'updated_at'])->toJson(); |
|
16 | 16 | })->middleware(SubstituteBindings::class); |
17 | 17 | } |
18 | 18 | |
@@ -106,6 +106,6 @@ discard block |
||
106 | 106 | { |
107 | 107 | $data = $this->call('GET', 'non-composite-users/1'); |
108 | 108 | $this->assertEquals(200, $data->getStatusCode()); |
109 | - $this->assertEquals($model->setHidden(['created_at','updated_at'])->toJson(), $data->getContent()); |
|
109 | + $this->assertEquals($model->setHidden(['created_at', 'updated_at'])->toJson(), $data->getContent()); |
|
110 | 110 | } |
111 | 111 | } |