Commit f84ac048 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 24a3605a
...@@ -63,7 +63,7 @@ class RegisterController extends Controller ...@@ -63,7 +63,7 @@ class RegisterController extends Controller
}*/ }*/
if (config('access.users.confirm_email') || config('access.users.requires_approval')) { if (config('access.users.confirm_email') || config('access.users.requires_approval')) {
$user = $this->user->create($request->only('first_name', 'last_name', 'email', 'password','is_term_accept')); $user = $this->user->create($request->only('first_name', 'last_name', 'email', 'password', 'is_term_accept'));
event(new UserRegistered($user)); event(new UserRegistered($user));
return redirect($this->redirectPath())->withFlashSuccess( return redirect($this->redirectPath())->withFlashSuccess(
......
...@@ -79,7 +79,7 @@ class UserRepository extends BaseRepository ...@@ -79,7 +79,7 @@ class UserRepository extends BaseRepository
} }
/** /**
* Create User * Create User.
* *
* @param array $data * @param array $data
* @param bool $provider * @param bool $provider
...@@ -115,7 +115,6 @@ class UserRepository extends BaseRepository ...@@ -115,7 +115,6 @@ class UserRepository extends BaseRepository
$user->confirmed = 1; $user->confirmed = 1;
} }
DB::transaction(function () use ($user) { DB::transaction(function () use ($user) {
if ($user->save()) { if ($user->save()) {
/* /*
......
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddNullConstraintOnCreatedByOnUserTable extends Migration class AddNullConstraintOnCreatedByOnUserTable extends Migration
{ {
......
...@@ -2,16 +2,12 @@ ...@@ -2,16 +2,12 @@
namespace Tests\Feature; namespace Tests\Feature;
use Faker\Generator;
use Tests\BrowserKitTestCase;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Event;
use App\Events\Frontend\Auth\UserLoggedIn;
use App\Events\Frontend\Auth\UserRegistered; use App\Events\Frontend\Auth\UserRegistered;
use Illuminate\Support\Facades\Event;
use Tests\BrowserKitTestCase;
class RegistrationTest extends BrowserKitTestCase class RegistrationTest extends BrowserKitTestCase
{ {
/** @test */ /** @test */
public function registration_page_loads_properly() public function registration_page_loads_properly()
{ {
...@@ -46,6 +42,7 @@ class RegistrationTest extends BrowserKitTestCase ...@@ -46,6 +42,7 @@ class RegistrationTest extends BrowserKitTestCase
* Test it works with confirming email on or off, and that the confirm email notification is sent * Test it works with confirming email on or off, and that the confirm email notification is sent
* Note: Captcha is disabled by default in phpunit.xml. * Note: Captcha is disabled by default in phpunit.xml.
*/ */
/** @test */ /** @test */
public function test_registration_form() public function test_registration_form()
{ {
...@@ -55,7 +52,6 @@ class RegistrationTest extends BrowserKitTestCase ...@@ -55,7 +52,6 @@ class RegistrationTest extends BrowserKitTestCase
config(['access.users.confirm_email' => false]); config(['access.users.confirm_email' => false]);
config(['access.users.requires_approval' => false]); config(['access.users.requires_approval' => false]);
$this->visit('/register') $this->visit('/register')
->type('John', 'first_name') ->type('John', 'first_name')
->type('Doe', 'last_name') ->type('Doe', 'last_name')
...@@ -75,5 +71,4 @@ class RegistrationTest extends BrowserKitTestCase ...@@ -75,5 +71,4 @@ class RegistrationTest extends BrowserKitTestCase
Event::assertDispatched(UserRegistered::class); Event::assertDispatched(UserRegistered::class);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment