Skip to content

Commit 05b9dca

Browse files
committed
Avoid error-prone syntax (if statement without brackets)
1 parent 897de15 commit 05b9dca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Http/Controllers/PasteController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
class PasteController extends Controller
1717
{
1818
public function index(){
19-
if (!Auth::check()) return redirect('/login');
19+
if (!Auth::check()) { return redirect('/login'); }
2020
return view('paste/index');
2121
}
2222

2323
public function submit(Requests\StorePaste $request){
24-
if (!Auth::check()) return redirect('/login');
25-
$title = (empty(trim(Input::get('pasteTitle')))) ? 'Untitled' : Input::get('pasteTitle');
24+
if (!Auth::check()) { return redirect('/login'); }
25+
$title = (empty(trim(Input::get('pasteTitle')))) ? 'Untitled' : Input::get('pasteTitle');
2626

2727
$expiration = Input::get('expire');
2828
$privacy = Input::get('privacy');

0 commit comments

Comments
 (0)