Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Sep 13, 2023
1 parent e077fda commit c4806f7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 28 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Stubs/Models/UserWithCustomOptimusConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public function nestedUsers(): HasMany

public function parentUser(): BelongsTo
{
return$this->belongsTo(UserWithCustomOptimusConnection::class, 'parent_id');
return $this->belongsTo(UserWithCustomOptimusConnection::class, 'parent_id');
}
}
2 changes: 1 addition & 1 deletion tests/Stubs/Models/UserWithDefaultOptimusConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public function nestedUsers(): HasMany

public function parentUser(): BelongsTo
{
return$this->belongsTo(UserWithDefaultOptimusConnection::class, 'parent_id');
return $this->belongsTo(UserWithDefaultOptimusConnection::class, 'parent_id');
}
}
6 changes: 3 additions & 3 deletions tests/Traits/OptimusEncodedRouteKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
parent::setUp();

$this->loadLaravelMigrations(config('database.default'));
$this->loadMigrationsFrom(__DIR__.'/../Stubs/Migrations');
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
$this->configurePrimeNumbers();
}

Expand Down Expand Up @@ -185,13 +185,13 @@ public function testExistingIntegerValuesBelow256AreResolved()
*
* @return \Cog\Tests\Laravel\Optimus\Stubs\Models\UserWithDefaultOptimusConnection
*/
protected function createUserWithDefaultOptimusConnection(array $data = []): UserWithDefaultOptimusConnection
protected function createUserWithDefaultOptimusConnection(array $attributes = []): UserWithDefaultOptimusConnection
{
return UserWithDefaultOptimusConnection::create(array_merge([
'name' => 'Default Test User',
'email' => 'test@user.com',
'password' => 'p4ssw0rd',
], $data));
], $attributes));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->foreignId('parent_id')->nullable();
});
}

public function down(): void
{
throw new \Exception('Migration is irreversible');
}
};

0 comments on commit c4806f7

Please sign in to comment.