Fixes based on sonar recommandations (#934)

This commit is contained in:
Alexis Saettler
2018-02-26 19:31:39 +01:00
committed by GitHub
parent 20d601580d
commit 9fbf194e89
21 changed files with 76 additions and 126 deletions
@@ -40,7 +40,7 @@ class PersonalizationController extends Controller
'protocol' => 'max:255|nullable',
])->validate();
$contactFieldType = auth()->user()->account->contactFieldTypes()->create(
return auth()->user()->account->contactFieldTypes()->create(
$request->only([
'name',
'protocol',
@@ -50,8 +50,6 @@ class PersonalizationController extends Controller
'account_id' => auth()->user()->account->id,
]
);
return $contactFieldType;
}
/**
@@ -111,7 +109,7 @@ class PersonalizationController extends Controller
]);
}
if ($contactFieldType->delible == false) {
if (! $contactFieldType->delible) {
return response()->json([
'errors' => [
'message' => trans('app.error_unauthorized'),