@@ -11,9 +11,9 @@ |
||
| 11 | 11 | ->where('comments.user_id', '=', $user_id) |
| 12 | 12 | ->first(); |
| 13 | 13 | |
| 14 | - if($comments->up > 0 || $comments->down > 0){ |
|
| 14 | + if ($comments->up > 0 || $comments->down > 0) { |
|
| 15 | 15 | return false; |
| 16 | - } else{ |
|
| 16 | + }else { |
|
| 17 | 17 | return true; |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | /** |
| 84 | 84 | * @param string $type |
| 85 | 85 | */ |
| 86 | - public static function getCommentsMax($type){ |
|
| 86 | + public static function getCommentsMax($type) { |
|
| 87 | 87 | $v = \DB::table('comments') |
| 88 | 88 | ->selectRaw('count(id) as maxviews') |
| 89 | 89 | ->where('content_type', '=', \DB::raw("'".$type."'")) |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | - public static function getPopularity($views, $max){ |
|
| 26 | + public static function getPopularity($views, $max) { |
|
| 27 | 27 | |
| 28 | 28 | $ret = 0; |
| 29 | 29 | |
| 30 | - if($max == 0 || $views == 0){ |
|
| 30 | + if ($max == 0 || $views == 0) { |
|
| 31 | 31 | $ret = 0; |
| 32 | - } else{ |
|
| 32 | + }else { |
|
| 33 | 33 | $ret = ($views / $max) * 100; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * @param integer $size |
| 41 | 41 | */ |
| 42 | - public static function getReadableBytes($size){ |
|
| 42 | + public static function getReadableBytes($size) { |
|
| 43 | 43 | $bytes = $size; |
| 44 | 44 | |
| 45 | 45 | if ($bytes == 0) { |
@@ -83,11 +83,11 @@ |
||
| 83 | 83 | return redirect()->action('BoardController@create_cat'); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - public function show_thread($threadid){ |
|
| 86 | + public function show_thread($threadid) { |
|
| 87 | 87 | $posts = BoardPost::with('user', 'thread', 'cat')->whereThreadId($threadid)->orderBy('id')->paginate(25); |
| 88 | - if(!Input::get('page')){ |
|
| 88 | + if (!Input::get('page')) { |
|
| 89 | 89 | return redirect('board/thread/'.$threadid.'?page='.$posts->lastPage()); |
| 90 | - }else{ |
|
| 90 | + }else { |
|
| 91 | 91 | return view('board.threads.show', [ |
| 92 | 92 | 'posts' => $posts, |
| 93 | 93 | ]); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | class TaggingController extends Controller |
| 11 | 11 | { |
| 12 | - public function index($orderby = 'tag', $direction = 'asc'){ |
|
| 12 | + public function index($orderby = 'tag', $direction = 'asc') { |
|
| 13 | 13 | $tags = Tag::all()->sortBy('title'); |
| 14 | 14 | |
| 15 | 15 | return view('tags.index', [ |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public function index_user() { |
| 40 | - if(\Auth::check()){ |
|
| 41 | - if(\Auth::user()->can('admin-games')){ |
|
| 40 | + if (\Auth::check()) { |
|
| 41 | + if (\Auth::user()->can('admin-games')) { |
|
| 42 | 42 | $ur = UserReport::all(); |
| 43 | - }else{ |
|
| 43 | + }else { |
|
| 44 | 44 | $ur = UserReport::whereUserId(\Auth::id()); |
| 45 | 45 | } |
| 46 | - }else{ |
|
| 46 | + }else { |
|
| 47 | 47 | $ur = null; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | ]); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - public function close_ticket($id){ |
|
| 55 | + public function close_ticket($id) { |
|
| 56 | 56 | $t = UserReport::whereId($id)->first(); |
| 57 | 57 | $t->closed = 1; |
| 58 | 58 | $t->closed_at = Carbon::now(); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | return redirect()->action('ReportController@index_user'); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - public function open_ticket($id){ |
|
| 65 | + public function open_ticket($id) { |
|
| 66 | 66 | $t = UserReport::whereId($id)->first(); |
| 67 | 67 | $t->closed = 0; |
| 68 | 68 | $t->closed_at = Carbon::now(); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | return redirect()->action('ReportController@index_user'); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - public function remark_ticket($id){ |
|
| 75 | + public function remark_ticket($id) { |
|
| 76 | 76 | |
| 77 | 77 | } |
| 78 | 78 | } |