Test Setup Failed
Push — master ( 18aad0...79eeb7 )
by Marcel
05:40
created
app/Http/Controllers/DeveloperController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\Models\Game;
6 5
 use App\Models\GamesDeveloper;
7 6
 use Illuminate\Http\Request;
8 7
 
Please login to merge, or discard this patch.
app/Http/Controllers/EventController.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use App\Models\EventSetting;
7 7
 use Illuminate\Http\Request;
8 8
 use Illuminate\Support\Facades\Input;
9
-use Illuminate\Validation\Rules\In;
10 9
 
11 10
 class EventController extends Controller
12 11
 {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     //-------------------------------------------------
14 14
     // Events
15
-    public function index(){
15
+    public function index() {
16 16
         $events = Event::orderBy('start_date', 'desc')->get();
17 17
 
18 18
         return view('events.index', [
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         ]);
21 21
     }
22 22
 
23
-    public function show($id){
23
+    public function show($id) {
24 24
         $event = Event::whereId($id)->first();
25 25
 
26 26
         return view('events.show', [
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
         ]);
29 29
     }
30 30
 
31
-    public function create(){
31
+    public function create() {
32 32
         return view('events.create');
33 33
     }
34 34
 
35
-    public function store(Request $request){
35
+    public function store(Request $request) {
36 36
         dd($request);
37 37
         $this->validate($request, [
38 38
             'title' => 'required',
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
         $es->reg_price = $request->get('price');
59 59
         $es->reg_start_date = $request->get('reg_start');
60 60
         $es->reg_end_date = $request->get('reg_end');
61
-        if($request->get('reg_allowed') == "on"){
61
+        if ($request->get('reg_allowed') == "on") {
62 62
             $es->reg_allowed = 1;
63
-        }else{
63
+        }else {
64 64
             $es->reg_allowed = 0;
65 65
         }
66 66
         $es->save();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         return redirect()->action('EventController@show', $e->id);
69 69
     }
70 70
 
71
-    public function edit($id){
71
+    public function edit($id) {
72 72
         $event = Event::whereId($id)->first();
73 73
 
74 74
         return view('events.edit', [
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         ]);
77 77
     }
78 78
 
79
-    public function update($id){
79
+    public function update($id) {
80 80
         $e = Event::whereId($id)->first();
81 81
         $e->title = Input::get('title');
82 82
         $e->description = Input::get('desc');
@@ -94,53 +94,53 @@  discard block
 block discarded – undo
94 94
 
95 95
     //-------------------------------------------------
96 96
     // Meetings
97
-    public function meeting_index($eventid){
97
+    public function meeting_index($eventid) {
98 98
 
99 99
     }
100 100
 
101
-    public function meeting_show($id){
101
+    public function meeting_show($id) {
102 102
 
103 103
     }
104 104
 
105
-    public function meeting_create(){
105
+    public function meeting_create() {
106 106
 
107 107
     }
108 108
 
109
-    public function meeting_store(){
109
+    public function meeting_store() {
110 110
 
111 111
     }
112 112
 
113
-    public function meeting_edit($id){
113
+    public function meeting_edit($id) {
114 114
 
115 115
     }
116 116
 
117
-    public function meeting_update($id){
117
+    public function meeting_update($id) {
118 118
 
119 119
     }
120 120
 
121 121
     //-------------------------------------------------
122 122
     // Pictures
123
-    public function picture_index(){
123
+    public function picture_index() {
124 124
 
125 125
     }
126 126
 
127
-    public function picture_show($id){
127
+    public function picture_show($id) {
128 128
 
129 129
     }
130 130
 
131
-    public function picture_create(){
131
+    public function picture_create() {
132 132
 
133 133
     }
134 134
 
135
-    public function picture_store(){
135
+    public function picture_store() {
136 136
 
137 137
     }
138 138
 
139
-    public function picture_edit($id){
139
+    public function picture_edit($id) {
140 140
 
141 141
     }
142 142
 
143
-    public function picture_update($id){
143
+    public function picture_update($id) {
144 144
 
145 145
     }
146 146
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $es->reg_end_date = $request->get('reg_end');
61 61
         if($request->get('reg_allowed') == "on"){
62 62
             $es->reg_allowed = 1;
63
-        }else{
63
+        } else{
64 64
             $es->reg_allowed = 0;
65 65
         }
66 66
         $es->save();
Please login to merge, or discard this patch.
app/Http/Controllers/GameController.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * Store a newly created resource in storage.
72 72
      *
73 73
      * @param  \Illuminate\Http\Request $request
74
-     * @return \Illuminate\Http\Response
74
+     * @return \Illuminate\Http\RedirectResponse
75 75
      */
76 76
     public function store(Request $request)
77 77
     {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      *
239 239
      * @param  \Illuminate\Http\Request $request
240 240
      * @param  int $id
241
-     * @return \Illuminate\Http\Response
241
+     * @return \Illuminate\Http\RedirectResponse
242 242
      */
243 243
     public function update(Request $request, $id)
244 244
     {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      * Remove the specified resource from storage.
265 265
      *
266 266
      * @param  int $id
267
-     * @return \Illuminate\Http\Response
267
+     * @return \Illuminate\Http\RedirectResponse
268 268
      */
269 269
     public function destroy($id)
270 270
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use App\Models\Screenshot;
14 14
 use App\Models\TagRelation;
15 15
 use Carbon\Carbon;
16
-use Doctrine\DBAL\Driver\IBMDB2\DB2Connection;
17 16
 use Illuminate\Http\Request;
18 17
 use Illuminate\Support\Facades\Input;
19 18
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function index($orderby = 'title', $direction = 'asc')
28 28
     {
29
-        if($orderby == 'developer.name') {
29
+        if ($orderby == 'developer.name') {
30 30
             $games = Game::Join('games_developer', 'games.id', '=', 'games_developer.game_id')
31 31
                 ->Join('developer', 'games_developer.developer_id', '=', 'developer.id')
32 32
                 ->orderBy($orderby, $direction)->select('games.*')->paginate(20);
33
-        }elseif($orderby == 'game.release_date'){
33
+        }elseif ($orderby == 'game.release_date') {
34 34
             $games = Game::Join('games_files', 'games.id', '=', 'games_files.game_id')
35 35
                 ->orderBy('games_files.release_year', $direction)
36 36
                 ->orderBy('games_files.release_month', $direction)
37 37
                 ->orderBy('games_files.release_day', $direction)
38 38
                 ->select('games.*')
39 39
                 ->paginate(20);
40
-        }else{
41
-            $games = Game::orderBy($orderby,$direction)->orderBy('title')->orderBy('subtitle')->paginate(20);
40
+        }else {
41
+            $games = Game::orderBy($orderby, $direction)->orderBy('title')->orderBy('subtitle')->paginate(20);
42 42
         }
43 43
 
44 44
         return view('games.index', [
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         $g = new Game;
94 94
         $g->title = $request->get('title');
95
-        $g->subtitle =  $request->get('subtitle', '');
95
+        $g->subtitle = $request->get('subtitle', '');
96 96
         $g->desc_md = $request->get('desc');
97 97
         $g->desc_html = \Markdown::convertToHtml($request->get('desc'));
98 98
         $g->website_url = $request->get('websiteurl', '');
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param $id
123 123
      * @return \Illuminate\Http\RedirectResponse
124 124
      */
125
-    public function store_developer(Request $request, $id){
125
+    public function store_developer(Request $request, $id) {
126 126
         $this->validate($request, [
127 127
             'developer' => 'required',
128 128
         ]);
@@ -268,17 +268,17 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function destroy($id)
270 270
     {
271
-        $validate = Input::get('confirm','');
272
-        if(\Auth::check()){
273
-            if(\Auth::user()->can('delete-games')){
274
-                if($validate == 'CONFIRM+'.$id){
271
+        $validate = Input::get('confirm', '');
272
+        if (\Auth::check()) {
273
+            if (\Auth::user()->can('delete-games')) {
274
+                if ($validate == 'CONFIRM+'.$id) {
275 275
                     Game::whereId($id)->delete();
276 276
                     GamesFile::whereGameId($id)->delete();
277 277
                     Screenshot::whereGameId($id)->delete();
278 278
                     GamesDeveloper::whereGameId($id)->delete();
279 279
                     Comment::whereContentId($id)->where('content_type', '=', 'game')->delete();
280 280
                     TagRelation::whereContentId($id)->where('content_type', '=', 'game')->delete();
281
-                }else{
281
+                }else {
282 282
                     return redirect()->action('GameController@edit', $id);
283 283
                 }
284 284
             }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         return redirect()->route('home');
289 289
     }
290 290
 
291
-    public function destroy_developer(Request $request, $id){
291
+    public function destroy_developer(Request $request, $id) {
292 292
         \DB::table('games_developer')
293 293
             ->where('game_id', '=', $id)
294 294
             ->where('developer_id', '=', $request->get('devid'))
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
             $games = Game::Join('games_developer', 'games.id', '=', 'games_developer.game_id')
31 31
                 ->Join('developer', 'games_developer.developer_id', '=', 'developer.id')
32 32
                 ->orderBy($orderby, $direction)->select('games.*')->paginate(20);
33
-        }elseif($orderby == 'game.release_date'){
33
+        } elseif($orderby == 'game.release_date'){
34 34
             $games = Game::Join('games_files', 'games.id', '=', 'games_files.game_id')
35 35
                 ->orderBy('games_files.release_year', $direction)
36 36
                 ->orderBy('games_files.release_month', $direction)
37 37
                 ->orderBy('games_files.release_day', $direction)
38 38
                 ->select('games.*')
39 39
                 ->paginate(20);
40
-        }else{
40
+        } else{
41 41
             $games = Game::orderBy($orderby,$direction)->orderBy('title')->orderBy('subtitle')->paginate(20);
42 42
         }
43 43
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                     GamesDeveloper::whereGameId($id)->delete();
279 279
                     Comment::whereContentId($id)->where('content_type', '=', 'game')->delete();
280 280
                     TagRelation::whereContentId($id)->where('content_type', '=', 'game')->delete();
281
-                }else{
281
+                } else{
282 282
                     return redirect()->action('GameController@edit', $id);
283 283
                 }
284 284
             }
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\User;
6
-use Illuminate\Http\Request;
7
-
8 5
 class HomeController extends Controller
9 6
 {
10 7
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/IndexController.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 use App\Models\News;
11 11
 use App\Models\Shoutbox;
12 12
 use Carbon\Carbon;
13
-use Illuminate\Http\Request;
14 13
 
15 14
 class IndexController extends Controller
16 15
 {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
 
15 15
 class IndexController extends Controller
16 16
 {
17
-    public function index(){
17
+    public function index() {
18 18
         $gametypes = \DB::table('games_files_types')
19 19
             ->select('id', 'title', 'short')
20 20
             ->get();
21 21
         $gtypes = array();
22
-        foreach ($gametypes as $gt){
22
+        foreach ($gametypes as $gt) {
23 23
             $t['title'] = $gt->title;
24 24
             $t['short'] = $gt->short;
25 25
             $gtypes[$gt->id] = $t;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
35 35
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
36 36
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
37
-            ->leftJoin('comments', function($join){
37
+            ->leftJoin('comments', function($join) {
38 38
                 $join->on('comments.content_id', '=', 'games.id');
39 39
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
40 40
             })
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
             ->orderByRaw('SUM(o.value) DESC')
91 91
             ->first();
92 92
 
93
-        if(\Auth::check()){
93
+        if (\Auth::check()) {
94 94
             $pm = \Auth::user()->newThreadsCount();
95
-        }else{
95
+        }else {
96 96
             $pm = '';
97 97
         }
98 98
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             ->get();
118 118
 
119 119
         $res = 0;
120
-        foreach ($size as $s){
120
+        foreach ($size as $s) {
121 121
             $res += $s->downsize;
122 122
         }
123 123
         $size = MiscHelper::getReadableBytes($res);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
127 127
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
128 128
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
129
-            ->leftJoin('comments', function($join){
129
+            ->leftJoin('comments', function($join) {
130 130
                 $join->on('comments.content_id', '=', 'games.id');
131 131
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
132 132
             })
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
162 162
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
163 163
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
164
-            ->leftJoin('comments', function($join){
164
+            ->leftJoin('comments', function($join) {
165 165
                 $join->on('comments.content_id', '=', 'games.id');
166 166
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
167 167
             })
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
         if(\Auth::check()){
94 94
             $pm = \Auth::user()->newThreadsCount();
95
-        }else{
95
+        } else{
96 96
             $pm = '';
97 97
         }
98 98
 
Please login to merge, or discard this patch.
app/Http/Controllers/MissingController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\Helpers\DatabaseHelper;
6
-use Illuminate\Http\Request;
7 6
 
8 7
 class MissingController extends Controller
9 8
 {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@  discard block
 block discarded – undo
8 8
 class MissingController extends Controller
9 9
 {
10 10
     //Spiele mit fehlenden Screenshots anzeigen
11
-    public function index_gamescreens(){
11
+    public function index_gamescreens() {
12 12
         $games = \DB::table('games')
13 13
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
14 14
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
15 15
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
16
-            ->leftJoin('comments', function($join){
16
+            ->leftJoin('comments', function($join) {
17 17
                 $join->on('comments.content_id', '=', 'games.id');
18 18
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
19 19
             })
20
-            ->leftJoin('screenshots', function($join){
20
+            ->leftJoin('screenshots', function($join) {
21 21
                 $join->on('screenshots.game_id', '=', 'games.id');
22 22
                 $join->on('screenshots.screenshot_id', '=', \DB::raw("1"));
23 23
             })
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             ->select('id', 'title', 'short')
51 51
             ->get();
52 52
         $gtypes = array();
53
-        foreach ($gametypes as $gt){
53
+        foreach ($gametypes as $gt) {
54 54
             $t['title'] = $gt->title;
55 55
             $t['short'] = $gt->short;
56 56
             $gtypes[$gt->id] = $t;
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     //Spiele mit fehlenden Spieledateien anzeigen
67
-    public function index_gamefiles(){
67
+    public function index_gamefiles() {
68 68
         $games = \DB::table('games')
69 69
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
70 70
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
71 71
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
72
-            ->leftJoin('comments', function($join){
72
+            ->leftJoin('comments', function($join) {
73 73
                 $join->on('comments.content_id', '=', 'games.id');
74 74
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
75 75
             })
76
-            ->leftJoin('screenshots', function($join){
76
+            ->leftJoin('screenshots', function($join) {
77 77
                 $join->on('screenshots.game_id', '=', 'games.id');
78 78
                 $join->on('screenshots.screenshot_id', '=', \DB::raw("1"));
79 79
             })
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             ->select('id', 'title', 'short')
107 107
             ->get();
108 108
         $gtypes = array();
109
-        foreach ($gametypes as $gt){
109
+        foreach ($gametypes as $gt) {
110 110
             $t['title'] = $gt->title;
111 111
             $t['short'] = $gt->short;
112 112
             $gtypes[$gt->id] = $t;
@@ -120,16 +120,16 @@  discard block
 block discarded – undo
120 120
     }
121 121
 
122 122
     //Spiele mit fehlender Spielebeschreibung anzeigen
123
-    public function index_gamedesc(){
123
+    public function index_gamedesc() {
124 124
         $games = \DB::table('games')
125 125
             ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id')
126 126
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
127 127
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
128
-            ->leftJoin('comments', function($join){
128
+            ->leftJoin('comments', function($join) {
129 129
                 $join->on('comments.content_id', '=', 'games.id');
130 130
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
131 131
             })
132
-            ->leftJoin('screenshots', function($join){
132
+            ->leftJoin('screenshots', function($join) {
133 133
                 $join->on('screenshots.game_id', '=', 'games.id');
134 134
                 $join->on('screenshots.screenshot_id', '=', \DB::raw("1"));
135 135
             })
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             ->select('id', 'title', 'short')
164 164
             ->get();
165 165
         $gtypes = array();
166
-        foreach ($gametypes as $gt){
166
+        foreach ($gametypes as $gt) {
167 167
             $t['title'] = $gt->title;
168 168
             $t['short'] = $gt->short;
169 169
             $gtypes[$gt->id] = $t;
Please login to merge, or discard this patch.
app/Http/Controllers/MsgBoxController.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\Helpers\DatabaseHelper;
6
-use Illuminate\Http\Request;
7
-use Symfony\Component\VarDumper\Cloner\Data;
8 6
 
9 7
 class MsgBoxController extends Controller
10 8
 {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 class MsgBoxController extends Controller
10 10
 {
11
-    public function submit_logo(){
11
+    public function submit_logo() {
12 12
         $msg = [
13 13
             'title' => trans('app.submit.logo.success.title'),
14 14
             'msg' => trans('app.submit.logo.success.msg'),
@@ -19,25 +19,25 @@  discard block
 block discarded – undo
19 19
         return view('msgbox', $msg);
20 20
     }
21 21
 
22
-    public function comment_add($type, $id){
22
+    public function comment_add($type, $id) {
23 23
         $msg = [
24 24
             'title' => trans('app.news.comments.success.title'),
25 25
             'msg' => trans('app.news.comments.success.msg'),
26 26
             'redirect' => trans('app.news.comments.success.redirect'),
27 27
         ];
28 28
 
29
-        if($type == 'news'){
29
+        if ($type == 'news') {
30 30
             $msg['redirect_to'] = url('news', $id);
31
-        }elseif($type == 'game'){
31
+        }elseif ($type == 'game') {
32 32
             $msg['redirect_to'] = url('games', $id);
33
-        }elseif($type == 'resource'){
33
+        }elseif ($type == 'resource') {
34 34
             $msg['redirect_to'] = route('resources.show', DatabaseHelper::getResourcePathArray($id));
35 35
         }
36 36
 
37 37
         return view('msgbox', $msg);
38 38
     }
39 39
 
40
-    public function game_add($id){
40
+    public function game_add($id) {
41 41
         $msg = [
42 42
             'title' => trans('app.games.add.success.title'),
43 43
             'msg' => trans('app.games.add.success.msg'),
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return view('msgbox', $msg);
49 49
     }
50 50
 
51
-    public function screenshot_add($gameid){
51
+    public function screenshot_add($gameid) {
52 52
         $msg = [
53 53
             'title' => 'screenshot erfolgreich hinzugefügt',
54 54
             'msg' => 'der screenshot wurde erfolgreich hinzugefügt',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         return view('msgbox', $msg);
60 60
     }
61 61
 
62
-    public function cdc_add($gameid){
62
+    public function cdc_add($gameid) {
63 63
         $msg = [
64 64
             'title' => 'coup de coeur erfolgreich hinzugefügt',
65 65
             'msg' => 'coup de coeur wurde erfolgreich hinzugefügt',
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 
29 29
         if($type == 'news'){
30 30
             $msg['redirect_to'] = url('news', $id);
31
-        }elseif($type == 'game'){
31
+        } elseif($type == 'game'){
32 32
             $msg['redirect_to'] = url('games', $id);
33
-        }elseif($type == 'resource'){
33
+        } elseif($type == 'resource'){
34 34
             $msg['redirect_to'] = route('resources.show', DatabaseHelper::getResourcePathArray($id));
35 35
         }
36 36
 
Please login to merge, or discard this patch.
app/Http/Controllers/NewsController.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * Store a newly created resource in storage.
48 48
      *
49 49
      * @param  \Illuminate\Http\Request  $request
50
-     * @return \Illuminate\Http\Response
50
+     * @return \Illuminate\Http\RedirectResponse
51 51
      */
52 52
     public function store(Request $request)
53 53
     {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      *
134 134
      * @param  \Illuminate\Http\Request  $request
135 135
      * @param  int  $id
136
-     * @return \Illuminate\Http\Response
136
+     * @return \Illuminate\Http\RedirectResponse
137 137
      */
138 138
     public function update(Request $request, $id)
139 139
     {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      * Remove the specified resource from storage.
159 159
      *
160 160
      * @param  int  $id
161
-     * @return \Illuminate\Http\Response
161
+     * @return \Illuminate\Http\RedirectResponse
162 162
      */
163 163
     public function destroy($id)
164 164
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\Models\Comment;
6 5
 use App\Models\News;
7 6
 use App\Models\UserSetting;
8 7
 use Illuminate\Http\Request;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $news = \DB::table('news')
20 20
             ->leftJoin('users', 'news.user_id', '=', 'users.id')
21
-            ->leftJoin('comments', function($join){
21
+            ->leftJoin('comments', function($join) {
22 22
                 $join->on('comments.content_id', '=', 'news.id');
23 23
                 $join->on('comments.content_type', '=', \DB::raw("'news'"));
24 24
             })
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function show($id)
74 74
     {
75
-        if(\Auth::check()){
76
-            if(UserSetting::whereUserId(\Auth::id())->first()->is_admin = 1){
75
+        if (\Auth::check()) {
76
+            if (UserSetting::whereUserId(\Auth::id())->first()->is_admin = 1) {
77 77
                 $news = \DB::table('news')
78 78
                     ->leftJoin('users', 'news.user_id', '=', 'users.id')
79 79
                     ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
80 80
                     ->where('news.id', '=', $id)
81 81
                     ->first();
82
-            }else{
82
+            }else {
83 83
                 $news = \DB::table('news')
84 84
                     ->leftJoin('users', 'news.user_id', '=', 'users.id')
85 85
                     ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     ->where('approved', '=', '1')
88 88
                     ->first();
89 89
             }
90
-        }else{
90
+        }else {
91 91
             $news = \DB::table('news')
92 92
                 ->leftJoin('users', 'news.user_id', '=', 'users.id')
93 93
                 ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         return redirect()->action('NewsController@index');
169 169
     }
170 170
 
171
-    public function approve($id, $approve){
171
+    public function approve($id, $approve) {
172 172
         $news = News::whereId($id)->first();
173 173
         $news->approved = $approve;
174 174
         $news->save();
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                     ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
80 80
                     ->where('news.id', '=', $id)
81 81
                     ->first();
82
-            }else{
82
+            } else{
83 83
                 $news = \DB::table('news')
84 84
                     ->leftJoin('users', 'news.user_id', '=', 'users.id')
85 85
                     ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     ->where('approved', '=', '1')
88 88
                     ->first();
89 89
             }
90
-        }else{
90
+        } else{
91 91
             $news = \DB::table('news')
92 92
                 ->leftJoin('users', 'news.user_id', '=', 'users.id')
93 93
                 ->select(['news.id', 'news.title', 'news.news_html', 'news_category', 'users.name', 'news.user_id', 'news.created_at', 'news.approved'])
Please login to merge, or discard this patch.
app/Http/Controllers/ResourceController.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Carbon\Carbon;
8 8
 use GrahamCampbell\Markdown\Facades\Markdown;
9 9
 use Illuminate\Http\Request;
10
-use Illuminate\Support\Facades\Redirect;
11 10
 
12 11
 class ResourceController extends Controller
13 12
 {
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
 
12 12
 class ResourceController extends Controller
13 13
 {
14
-    public function index(){
14
+    public function index() {
15 15
         $res = \DB::table('resources')
16 16
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
17
-            ->leftJoin('comments', function($join){
17
+            ->leftJoin('comments', function($join) {
18 18
                 $join->on('comments.content_id', '=', 'resources.id');
19 19
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
20 20
             })
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
             ->limit(20)
38 38
             ->get();
39 39
 
40
-        return view('resources.index',[
40
+        return view('resources.index', [
41 41
             'resources' => $res,
42 42
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
43 43
         ]);
44 44
     }
45 45
 
46
-    public function index_gfx(){
46
+    public function index_gfx() {
47 47
         $res = \DB::table('resources')
48 48
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
49
-            ->leftJoin('comments', function($join){
49
+            ->leftJoin('comments', function($join) {
50 50
                 $join->on('comments.content_id', '=', 'resources.id');
51 51
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
52 52
             })
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
             ->limit(20)
71 71
             ->get();
72 72
 
73
-        return view('resources.gfx.index',[
73
+        return view('resources.gfx.index', [
74 74
             'resources' => $res,
75 75
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
76 76
         ]);
77 77
     }
78 78
 
79
-    public function index_sfx(){
79
+    public function index_sfx() {
80 80
         $res = \DB::table('resources')
81 81
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
82
-            ->leftJoin('comments', function($join){
82
+            ->leftJoin('comments', function($join) {
83 83
                 $join->on('comments.content_id', '=', 'resources.id');
84 84
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
85 85
             })
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
             ->limit(20)
104 104
             ->get();
105 105
 
106
-        return view('resources.sfx.index',[
106
+        return view('resources.sfx.index', [
107 107
             'resources' => $res,
108 108
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
109 109
         ]);
110 110
     }
111 111
 
112
-    public function index_scripts(){
112
+    public function index_scripts() {
113 113
         $res = \DB::table('resources')
114 114
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
115
-            ->leftJoin('comments', function($join){
115
+            ->leftJoin('comments', function($join) {
116 116
                 $join->on('comments.content_id', '=', 'resources.id');
117 117
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
118 118
             })
@@ -136,16 +136,16 @@  discard block
 block discarded – undo
136 136
             ->limit(20)
137 137
             ->get();
138 138
 
139
-        return view('resources.scripts.index',[
139
+        return view('resources.scripts.index', [
140 140
             'resources' => $res,
141 141
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
142 142
         ]);
143 143
     }
144 144
 
145
-    public function index_tools(){
145
+    public function index_tools() {
146 146
         $res = \DB::table('resources')
147 147
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
148
-            ->leftJoin('comments', function($join){
148
+            ->leftJoin('comments', function($join) {
149 149
                 $join->on('comments.content_id', '=', 'resources.id');
150 150
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
151 151
             })
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
             ->limit(20)
170 170
             ->get();
171 171
 
172
-        return view('resources.tools.index',[
172
+        return view('resources.tools.index', [
173 173
             'resources' => $res,
174 174
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
175
-        ]);    }
175
+        ]); }
176 176
 
177
-    public function index_gfx_cat($cat){
177
+    public function index_gfx_cat($cat) {
178 178
         $res = \DB::table('resources')
179 179
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
180
-            ->leftJoin('comments', function($join){
180
+            ->leftJoin('comments', function($join) {
181 181
                 $join->on('comments.content_id', '=', 'resources.id');
182 182
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
183 183
             })
@@ -201,16 +201,16 @@  discard block
 block discarded – undo
201 201
             ->orderBy('resources.created_at', 'desc')
202 202
             ->get();
203 203
 
204
-        return view('resources.gfx.index_cat',[
204
+        return view('resources.gfx.index_cat', [
205 205
             'resources' => $res,
206 206
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
207 207
         ]);
208 208
     }
209 209
 
210
-    public function index_sfx_cat($cat){
210
+    public function index_sfx_cat($cat) {
211 211
         $res = \DB::table('resources')
212 212
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
213
-            ->leftJoin('comments', function($join){
213
+            ->leftJoin('comments', function($join) {
214 214
                 $join->on('comments.content_id', '=', 'resources.id');
215 215
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
216 216
             })
@@ -234,16 +234,16 @@  discard block
 block discarded – undo
234 234
             ->orderBy('resources.created_at', 'desc')
235 235
             ->get();
236 236
 
237
-        return view('resources.sfx.index_cat',[
237
+        return view('resources.sfx.index_cat', [
238 238
             'resources' => $res,
239 239
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
240 240
         ]);
241 241
     }
242 242
 
243
-    public function index_scripts_cat($cat){
243
+    public function index_scripts_cat($cat) {
244 244
         $res = \DB::table('resources')
245 245
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
246
-            ->leftJoin('comments', function($join){
246
+            ->leftJoin('comments', function($join) {
247 247
                 $join->on('comments.content_id', '=', 'resources.id');
248 248
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
249 249
             })
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
             ->orderBy('resources.created_at', 'desc')
268 268
             ->get();
269 269
 
270
-        return view('resources.scripts.index_cat',[
270
+        return view('resources.scripts.index_cat', [
271 271
             'resources' => $res,
272 272
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
273 273
         ]);
274 274
     }
275 275
 
276
-    public function index_tools_cat($cat){
276
+    public function index_tools_cat($cat) {
277 277
         $res = \DB::table('resources')
278 278
             ->leftJoin('users', 'users.id', '=', 'resources.user_id')
279
-            ->leftJoin('comments', function($join){
279
+            ->leftJoin('comments', function($join) {
280 280
                 $join->on('comments.content_id', '=', 'resources.id');
281 281
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
282 282
             })
@@ -300,16 +300,16 @@  discard block
 block discarded – undo
300 300
             ->orderBy('resources.created_at', 'desc')
301 301
             ->get();
302 302
 
303
-        return view('resources.tools.index_cat',[
303
+        return view('resources.tools.index_cat', [
304 304
             'resources' => $res,
305 305
             'commentsmax' => DatabaseHelper::getCommentsMax('resource'),
306 306
         ]);
307 307
     }
308 308
 
309
-    public function show($type, $cat, $id){
309
+    public function show($type, $cat, $id) {
310 310
         $resource = \DB::table('resources')
311 311
             ->leftJoin('users', 'resources.user_id', '=', 'users.id')
312
-            ->leftJoin('comments', function($join){
312
+            ->leftJoin('comments', function($join) {
313 313
                 $join->on('comments.content_id', '=', 'resources.id');
314 314
                 $join->on('comments.content_type', '=', \DB::raw("'resource'"));
315 315
             })
@@ -348,18 +348,18 @@  discard block
 block discarded – undo
348 348
         ]);
349 349
     }
350 350
 
351
-    public function create(){
351
+    public function create() {
352 352
         return view('resources.create');
353 353
     }
354 354
 
355
-    public function create_steps(Request $request){
355
+    public function create_steps(Request $request) {
356 356
         return view('resources.create', [
357 357
             'request' => $request,
358 358
         ]);
359 359
 
360 360
     }
361 361
 
362
-    public function store(Request $request){
362
+    public function store(Request $request) {
363 363
         $this->validate($request, [
364 364
             'step' => 'required',
365 365
             'type' => 'required|not_in:0',
@@ -371,20 +371,20 @@  discard block
 block discarded – undo
371 371
 
372 372
         $content_path = '';
373 373
 
374
-        if($request->get('content_type') == 'url'){
375
-            if(filter_var($request->get('url'), FILTER_VALIDATE_URL)){
374
+        if ($request->get('content_type') == 'url') {
375
+            if (filter_var($request->get('url'), FILTER_VALIDATE_URL)) {
376 376
                 $content_path = $request->get('url');
377
-            }else{
377
+            }else {
378 378
                 return back()->withInput();
379 379
             }
380
-        }else{
380
+        }else {
381 381
             $storagetemp = 'temp/'.$request->get('uuid').'/file';
382 382
             $storagedest = 'resources/'.$request->get('uuid').'.'.$request->get('ext');
383 383
 
384 384
             $exists = \Storage::disk('local')->exists($storagetemp);
385
-            if($exists === true) {
385
+            if ($exists === true) {
386 386
                 \Storage::move($storagetemp, $storagedest);
387
-            }else{
387
+            }else {
388 388
                 return back()->withInput();
389 389
             }
390 390
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -374,17 +374,17 @@
 block discarded – undo
374 374
         if($request->get('content_type') == 'url'){
375 375
             if(filter_var($request->get('url'), FILTER_VALIDATE_URL)){
376 376
                 $content_path = $request->get('url');
377
-            }else{
377
+            } else{
378 378
                 return back()->withInput();
379 379
             }
380
-        }else{
380
+        } else{
381 381
             $storagetemp = 'temp/'.$request->get('uuid').'/file';
382 382
             $storagedest = 'resources/'.$request->get('uuid').'.'.$request->get('ext');
383 383
 
384 384
             $exists = \Storage::disk('local')->exists($storagetemp);
385 385
             if($exists === true) {
386 386
                 \Storage::move($storagetemp, $storagedest);
387
-            }else{
387
+            } else{
388 388
                 return back()->withInput();
389 389
             }
390 390
 
Please login to merge, or discard this patch.