refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -23,7 +23,6 @@ namespace App\Observers;
|
||||
|
||||
use App\Exceptions\ProfileAlreadyExistsException;
|
||||
use App\Exceptions\ProfileCreationFailedException;
|
||||
use App\Profile;
|
||||
use App\Services\ProfileService;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -45,20 +44,15 @@ class UserObserver
|
||||
{
|
||||
$profileService = new ProfileService();
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
$profileService->createProfile($user);
|
||||
}
|
||||
catch (ProfileAlreadyExistsException $exception)
|
||||
{
|
||||
} catch (ProfileAlreadyExistsException $exception) {
|
||||
Log::error('Attempting to create profile that already exists!', [
|
||||
'trace' => $exception->getTrace()
|
||||
'trace' => $exception->getTrace(),
|
||||
]);
|
||||
}
|
||||
catch (ProfileCreationFailedException $e)
|
||||
{
|
||||
} catch (ProfileCreationFailedException $e) {
|
||||
Log::error('Failed creating a new profile!', [
|
||||
'trace' => $e->getTrace()
|
||||
'trace' => $e->getTrace(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user