@@ -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('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 | } |
@@ -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,7 +11,7 @@ |
||
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) { |
|
14 | + $app['router']->get('non-composite-users/{testUserNonComposite}', function(TestUserNonComposite $testUserNonComposite) { |
|
15 | 15 | return $testUserNonComposite->setHidden(['created_at', 'updated_at'])->toJson(); |
16 | 16 | })->middleware(SubstituteBindings::class); |
17 | 17 | } |
@@ -55,8 +55,7 @@ |
||
55 | 55 | |
56 | 56 | try { |
57 | 57 | $user->wrongConfiguredReferrer()->first(); |
58 | - } |
|
59 | - catch (\Exception $exception) { |
|
58 | + } catch (\Exception $exception) { |
|
60 | 59 | $this->assertInstanceOf(WrongRelationConfigurationException::class, $exception); |
61 | 60 | } |
62 | 61 | } |
@@ -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 | //primary |
16 | 16 | $table->unsignedInteger('user_id'); |
17 | 17 | $table->unsignedInteger('organization_id'); |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function apply($query) |
40 | 40 | { |
41 | - $query->where(function ($query) { |
|
41 | + $query->where(function($query) { |
|
42 | 42 | foreach ($this->ids as $compositeKey) { |
43 | 43 | // try to parse normalized key |
44 | 44 | if (!is_array($compositeKey)) { |
45 | 45 | $compositeKey = $this->parseNormalizedKey($compositeKey); |
46 | 46 | } |
47 | 47 | |
48 | - $queryWriter = function ($query) use ($compositeKey) { |
|
48 | + $queryWriter = function($query) use ($compositeKey) { |
|
49 | 49 | /* |
50 | 50 | * @var \Illuminate\Database\Query\Builder $query |
51 | 51 | */ |