Fix issues proposed by sonar (#986)

This commit is contained in:
Alexis Saettler
2018-03-08 22:37:27 +01:00
committed by GitHub
parent 83fbc5fc48
commit 558515b59a
37 changed files with 86 additions and 91 deletions
@@ -36,7 +36,7 @@ class IntroductionsController extends Controller
// place
if ($request->get('metThroughId') != 0) {
try {
$metThroughContact = Contact::where('account_id', auth()->user()->account_id)
Contact::where('account_id', auth()->user()->account_id)
->where('id', $request->get('metThroughId'))
->firstOrFail();
} catch (ModelNotFoundException $e) {
@@ -54,7 +54,7 @@ class IntroductionsController extends Controller
$specialDate = $contact->setSpecialDate('first_met', $request->input('first_met_year'), $request->input('first_met_month'), $request->input('first_met_day'));
if ($request->addReminder == 'on') {
$newReminder = $specialDate->setReminder('year', 1, trans('people.introductions_reminder_title', ['name' => $contact->first_name]));
$specialDate->setReminder('year', 1, trans('people.introductions_reminder_title', ['name' => $contact->first_name]));
}
}