Formatting

This commit is contained in:
Nabeel Shahzad
2019-07-16 14:06:13 -04:00
parent 3e1d9080df
commit 80560ec20c
4 changed files with 7 additions and 7 deletions
@@ -1,10 +1,9 @@
<?php <?php
use App\Contracts\Model; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UsersAddPilotId extends Migration class UsersAddPilotId extends Migration
{ {
+1
View File
@@ -122,6 +122,7 @@ class UserService extends Service
{ {
if (User::where('pilot_id', '=', $pilot_id)->exists()) { if (User::where('pilot_id', '=', $pilot_id)->exists()) {
Log::error('User with id '.$pilot_id.' already exists'); Log::error('User with id '.$pilot_id.' already exists');
throw new UserPilotIdExists(); throw new UserPilotIdExists();
} }
+1 -1
View File
@@ -1,6 +1,5 @@
<?php <?php
use App\Models\Airport;
use App\Models\User; use App\Models\User;
use App\Repositories\SettingRepository; use App\Repositories\SettingRepository;
use App\Services\UserService; use App\Services\UserService;
@@ -192,6 +191,7 @@ class UserTest extends TestCase
/** /**
* Test the pilot ID being added when a new user is created * Test the pilot ID being added when a new user is created
*
* @expectedException \App\Exceptions\UserPilotIdExists * @expectedException \App\Exceptions\UserPilotIdExists
*/ */
public function testUserPilotIdChangeAlreadyExists() public function testUserPilotIdChangeAlreadyExists()