@@ -70,7 +70,7 @@ |
||
| 70 | 70 | protected $guarded = []; |
| 71 | 71 | protected $appends = ['votes']; |
| 72 | 72 | |
| 73 | - public function user(){ |
|
| 73 | + public function user() { |
|
| 74 | 74 | return $this->hasOne('App\Models\User', 'id', 'user_id'); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | 'release_date' => $reldate, |
| 94 | 94 | ]); |
| 95 | 95 | } |
| 96 | - } else { |
|
| 96 | + }else { |
|
| 97 | 97 | Game::whereId($gameid) |
| 98 | 98 | ->update([ |
| 99 | 99 | 'release_date' => $reldate, |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | if ($track) { |
| 147 | 147 | if (Carbon::parse($track->last_read)->timestamp < Carbon::parse($thread->last_created_at)->timestamp) { |
| 148 | 148 | return true; |
| 149 | - } else { |
|
| 149 | + }else { |
|
| 150 | 150 | return false; |
| 151 | 151 | } |
| 152 | - } else { |
|
| 152 | + }else { |
|
| 153 | 153 | return true; |
| 154 | 154 | } |
| 155 | - } else { |
|
| 155 | + }else { |
|
| 156 | 156 | return false; |
| 157 | 157 | } |
| 158 | 158 | } |
@@ -193,10 +193,10 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | if ($releasedate) { |
| 195 | 195 | return Carbon::parse($releasedate->reldate)->toDateString(); |
| 196 | - } else { |
|
| 196 | + }else { |
|
| 197 | 197 | return ''; |
| 198 | 198 | } |
| 199 | - } else { |
|
| 199 | + }else { |
|
| 200 | 200 | return Carbon::parse($game->release_date)->toDateString(); |
| 201 | 201 | } |
| 202 | 202 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | foreach ($developers as $dev) { |
| 218 | 218 | if ($urlstyle == true) { |
| 219 | 219 | $res = $res.'<a href="'.url('developer', $dev->id).'">'.$dev->name.'</a> :: '; |
| 220 | - } else { |
|
| 220 | + }else { |
|
| 221 | 221 | $res .= $dev->name.', '; |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | if ($lang) { |
| 299 | 299 | return $lang->id; |
| 300 | - } else { |
|
| 300 | + }else { |
|
| 301 | 301 | return 0; |
| 302 | 302 | } |
| 303 | 303 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | |
| 316 | 316 | if ($dev) { |
| 317 | 317 | return $dev->id; |
| 318 | - } else { |
|
| 318 | + }else { |
|
| 319 | 319 | return 0; |
| 320 | 320 | } |
| 321 | 321 | } |
@@ -43,14 +43,14 @@ |
||
| 43 | 43 | return $htmlcontent; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - public static function StrikeText($htmlcontent){ |
|
| 46 | + public static function StrikeText($htmlcontent) { |
|
| 47 | 47 | //match for ~~~Text~~ |
| 48 | 48 | $htmlcontent = preg_replace('/(~{2})(.*?)(~{2})/', '<s>$2</s>', $htmlcontent); |
| 49 | 49 | |
| 50 | 50 | return $htmlcontent; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - public static function BlockQuote($mhtmcontent){ |
|
| 53 | + public static function BlockQuote($mhtmcontent) { |
|
| 54 | 54 | $mhtmcontent = str_replace('<blockquote>', '<blockquote class="blockquote">', $mhtmcontent); |
| 55 | 55 | return $mhtmcontent; |
| 56 | 56 | } |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function handle($request, Closure $next) |
| 19 | 19 | { |
| 20 | - if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
|
| 20 | + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
| 21 | 21 | $http_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); |
| 22 | - }else{ |
|
| 22 | + }else { |
|
| 23 | 23 | $http_lang = 'en'; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | if (Auth::check()) { |
| 41 | 41 | if (Auth::user()->settings->language == '') { |
| 42 | 42 | \App::setLocale($userLangs); |
| 43 | - } else { |
|
| 43 | + }else { |
|
| 44 | 44 | \App::setLocale(\Auth::user()->settings->language); |
| 45 | 45 | } |
| 46 | - } else { |
|
| 46 | + }else { |
|
| 47 | 47 | \App::setLocale($userLangs); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
| 21 | 21 | $http_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); |
| 22 | - }else{ |
|
| 22 | + } else{ |
|
| 23 | 23 | $http_lang = 'en'; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | ->orderBy($orderby, $direction) |
| 39 | 39 | ->select('games.*') |
| 40 | 40 | ->paginate(25); |
| 41 | - } else { |
|
| 41 | + }else { |
|
| 42 | 42 | $games = Game::Join('tag_relations', 'tag_relations.content_id', '=', 'games.id') |
| 43 | 43 | ->Where('tag_relations.tag_id', '=', $id) |
| 44 | 44 | ->where('tag_relations.content_type', '=', 'game') |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | 'gamefile_id' => $id, |
| 49 | 49 | 'created_at' => Carbon::now(), |
| 50 | 50 | ]); |
| 51 | - } else { |
|
| 51 | + }else { |
|
| 52 | 52 | UserDownloadLog::insert([ |
| 53 | 53 | 'user_id' => 0, |
| 54 | 54 | 'gamefile_id' => $id, |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | if ($request->get('forbidden') && ($request->get('forbidden') != '')) { |
| 230 | 230 | $gamefile->forbidden = 1; |
| 231 | 231 | $gamefile->reason = $request->get('forbidden'); |
| 232 | - } else { |
|
| 232 | + }else { |
|
| 233 | 233 | $gamefile->forbidden = 0; |
| 234 | 234 | $gamefile->reason = ''; |
| 235 | 235 | } |
@@ -24,15 +24,15 @@ discard block |
||
| 24 | 24 | //Prüfen ob Screenshots vorhanden sind |
| 25 | 25 | if (!$s) {//Es sind keine Screenshots vorhanden |
| 26 | 26 | $storagePath = public_path().'/assets/no_image.png'; |
| 27 | - } else {//Es sind Screenshots vorhanden |
|
| 27 | + }else {//Es sind Screenshots vorhanden |
|
| 28 | 28 | $storagePath = \Storage::get($s->filename); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $img = \Image::make($storagePath); |
| 32 | - if (! $full) { |
|
| 32 | + if (!$full) { |
|
| 33 | 33 | $response = \Response::make($img->encode('jpg', 80)); |
| 34 | 34 | $response->header('Content-Type', 'image/jpg'); |
| 35 | - } else { |
|
| 35 | + }else { |
|
| 36 | 36 | $response = \Response::make($img->encode('png')); |
| 37 | 37 | $response->header('Content-Type', 'image/png'); |
| 38 | 38 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | 'screenid' => $screenid, |
| 58 | 58 | 'game' => $game, |
| 59 | 59 | ]); |
| 60 | - } else { |
|
| 60 | + }else { |
|
| 61 | 61 | return redirect()->back(); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $old = Screenshot::whereGameId($gameid)->where('screenshot_id', '=', $screenid)->first(); |
| 80 | 80 | if ($old) { |
| 81 | 81 | $old->delete(); |
| 82 | - } else { |
|
| 82 | + }else { |
|
| 83 | 83 | event(new Obyx('screenshot-add', \Auth::id())); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $scr->save(); |
| 93 | 93 | |
| 94 | 94 | return redirect()->route('screenshot.upload.success', $gameid); |
| 95 | - } else { |
|
| 95 | + }else { |
|
| 96 | 96 | return redirect()->back(); |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | 'game' => $game, |
| 32 | 32 | 'index' => $fp, |
| 33 | 33 | ]); |
| 34 | - } else { |
|
| 34 | + }else { |
|
| 35 | 35 | return redirect()->action('IndexController@index'); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | ]) |
| 53 | 53 | ->first(); |
| 54 | 54 | |
| 55 | - if (! $save) { |
|
| 55 | + if (!$save) { |
|
| 56 | 56 | $s = new GamesSavegame(); |
| 57 | 57 | $s->save_data = $value; |
| 58 | 58 | $s->slot_id = $key; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $s->user_id = \Auth::id(); |
| 61 | 61 | $s->save(); |
| 62 | 62 | \Log::info('created'); |
| 63 | - } else { |
|
| 63 | + }else { |
|
| 64 | 64 | $save->save_data = $value; |
| 65 | 65 | $save->save(); |
| 66 | 66 | \Log::info('updated'); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ]) |
| 83 | 83 | ->first(); |
| 84 | 84 | |
| 85 | - if (! $save) { |
|
| 85 | + if (!$save) { |
|
| 86 | 86 | $s = new GamesSavegame(); |
| 87 | 87 | $s->save_data = $value; |
| 88 | 88 | $s->slot_id = $key; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $s->user_id = \Auth::id(); |
| 91 | 91 | $s->save(); |
| 92 | 92 | \Log::info('created'); |
| 93 | - } else { |
|
| 93 | + }else { |
|
| 94 | 94 | $save->save_data = $value; |
| 95 | 95 | $save->save(); |
| 96 | 96 | \Log::info('updated'); |