refactor: if / else / elseif statements

- Change If Else Value Assign To Early Return
- Change Nested Ifs To Early Return
- Remove Always Else
This commit is contained in:
HDVinnie
2020-02-12 12:34:34 -05:00
parent 8607387023
commit 611fcd6bc1
57 changed files with 1065 additions and 1341 deletions
+3 -5
View File
@@ -62,12 +62,10 @@ class SeedboxController extends Controller
if ($v->fails()) {
return redirect()->route('seedboxes.index', ['username' => $user->username])
->withErrors($v->errors());
} else {
$seedbox->save();
return redirect()->route('seedboxes.index', ['username' => $user->username])
->withSuccess('Seedbox Has Been Successfully Added!');
}
$seedbox->save();
return redirect()->route('seedboxes.index', ['username' => $user->username])
->withSuccess('Seedbox Has Been Successfully Added!');
}
/**