@@ -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 |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $this->seed(\TestUserNonCompositeSeeder::class); |
25 | 25 | $this->seed(\TestBinaryUserSeeder::class); |
26 | 26 | |
27 | - if(env('DEBUG_QUERY_LOG', true)) { |
|
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 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | protected function getEnvironmentSetUp($app) |
13 | 13 | { |
14 | 14 | $app['config']->set('database.default', 'testing'); |
15 | - $app['router']->get('non-composite-users/{testUserNonComposite}', function (TestUserNonComposite $testUserNonComposite) { |
|
15 | + $app['router']->get('non-composite-users/{testUserNonComposite}', function(TestUserNonComposite $testUserNonComposite) { |
|
16 | 16 | return $testUserNonComposite->toJson(); |
17 | 17 | })->middleware(SubstituteBindings::class); |
18 | 18 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | 'user_id' => 1, |
17 | 17 | 'organization_id' => 100, |
18 | 18 | ]) |
19 | - ->where('user_id',1) |
|
19 | + ->where('user_id', 1) |
|
20 | 20 | ->first(); |
21 | 21 | $this->assertNotNull($model); |
22 | 22 | $this->assertInstanceOf(TestUser::class, $model); |