Test Setup Failed
Branch master (5ae7ae)
by Marcel
17:28
created
app/Helpers/MiscHelper.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@  discard block
 block discarded – undo
9 9
         $difference = [];
10 10
         foreach ($array1 as $key => $value) {
11 11
             if (is_array($value)) {
12
-                if (! isset($array2[$key]) || ! is_array($array2[$key])) {
12
+                if (!isset($array2[$key]) || !is_array($array2[$key])) {
13 13
                     $difference[$key] = $value;
14
-                } else {
14
+                }else {
15 15
                     $new_diff = self::array_diff_assoc_recursive($value, $array2[$key]);
16
-                    if (! empty($new_diff)) {
16
+                    if (!empty($new_diff)) {
17 17
                         $difference[$key] = $new_diff;
18 18
                     }
19 19
                 }
20
-            } elseif (! array_key_exists($key, $array2) || $array2[$key] !== $value) {
20
+            } elseif (!array_key_exists($key, $array2) || $array2[$key] !== $value) {
21 21
                 $difference[$key] = $value;
22 22
             }
23 23
         }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         if ($max == 0 || $views == 0) {
31 31
             $ret = 0;
32
-        } else {
32
+        }else {
33 33
             $ret = ($views / $max) * 100;
34 34
         }
35 35
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      *
17 17
      * @param string $branch The git branch to check
18 18
      *
19
-     * @return mixed Either the hash or a boolean false
19
+     * @return string Either the hash or a boolean false
20 20
      */
21 21
     public static function get_current_git_commit($branch = 'master')
22 22
     {
Please login to merge, or discard this patch.
app/Http/Controllers/FineUploaderController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $fu = new FineUploader();
20 20
         $destpath = storage_path('app/public/temp');
21
-        if (! file_exists($destpath)) {
21
+        if (!file_exists($destpath)) {
22 22
             mkdir($destpath);
23 23
         }
24 24
         $res = $fu->handleUpload(storage_path('app/public/temp'), 'file');
Please login to merge, or discard this patch.
app/Http/Controllers/EventController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $es->reg_end_date = $request->get('reg_end');
72 72
         if ($request->get('reg_allowed') == 'on') {
73 73
             $es->reg_allowed = 1;
74
-        } else {
74
+        }else {
75 75
             $es->reg_allowed = 0;
76 76
         }
77 77
         $es->save();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $settings->reg_allowed = Input::get('reg_allowed');
105 105
         if (Input::get('reg_allowed') == 'on') {
106 106
             $settings->reg_allowed = 1;
107
-        } else {
107
+        }else {
108 108
             $settings->reg_allowed = 0;
109 109
         }
110 110
         $settings->save();
Please login to merge, or discard this patch.
app/Http/Controllers/GameController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             $games = Game::Join('games_developer', 'games.id', '=', 'games_developer.game_id')
38 38
                 ->Join('developer', 'games_developer.developer_id', '=', 'developer.id')
39 39
                 ->orderBy($orderby, $direction)->select('games.*')->paginate($rows);
40
-        } else {
40
+        }else {
41 41
             $games = Game::orderBy($orderby, $direction)->orderBy('title')->orderBy('subtitle')->paginate($rows);
42 42
         }
43 43
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                     GamesDeveloper::whereGameId($id)->delete();
287 287
                     Comment::whereContentId($id)->where('content_type', '=', 'game')->delete();
288 288
                     TagRelation::whereContentId($id)->where('content_type', '=', 'game')->delete();
289
-                } else {
289
+                }else {
290 290
                     return redirect()->action('GameController@edit', $id);
291 291
                 }
292 292
             }
Please login to merge, or discard this patch.
app/Http/Controllers/IndexController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         if (\Auth::check()) {
63 63
             $pm = \Auth::user()->newThreadsCount();
64
-        } else {
64
+        }else {
65 65
             $pm = '';
66 66
         }
67 67
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id')
97 97
             ->leftJoin('makers', 'makers.id', '=', 'games.maker_id')
98 98
             ->leftJoin('languages', 'languages.id', '=', 'games.lang_id')
99
-            ->leftJoin('comments', function ($join) {
99
+            ->leftJoin('comments', function($join) {
100 100
                 $join->on('comments.content_id', '=', 'games.id');
101 101
                 $join->on('comments.content_type', '=', \DB::raw("'game'"));
102 102
             })
Please login to merge, or discard this patch.
app/Console/Commands/PlayerCreateInfo.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -148,6 +148,9 @@
 block discarded – undo
148 148
         $this->info('Fertig.');
149 149
     }
150 150
 
151
+    /**
152
+     * @return string
153
+     */
151 154
     public function search_for_base_path($filepath)
152 155
     {
153 156
         $dirarray = [
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -107,20 +107,20 @@  discard block
 block discarded – undo
107 107
                             break;
108 108
                         }
109 109
                     }
110
-                } else {
110
+                }else {
111 111
                     // RPG Maker 2k/2k3
112 112
                     for ($i = 0; $i < $zip->numFiles; $i++) {
113 113
                         $filename = $zip->getNameIndex($i);
114 114
 
115
-                        if (! ends_with($filename, '/') and ! starts_with($filename, '_MACOSX')) {
115
+                        if (!ends_with($filename, '/') and !starts_with($filename, '_MACOSX')) {
116 116
                             $imp = $this->search_for_base_path($filename);
117 117
 
118
-                            if (! $imp == '') {
118
+                            if (!$imp == '') {
119 119
                                 $pl = new PlayerIndexjson();
120 120
                                 $pl->gamefile_id = $toindex->id;
121
-                                if (! ends_with(strtolower($imp), ['.exe', '.lmu', '.ldb', 'ini', '.dll', 'lmt', 'lsd'])) {
121
+                                if (!ends_with(strtolower($imp), ['.exe', '.lmu', '.ldb', 'ini', '.dll', 'lmt', 'lsd'])) {
122 122
                                     $pl->key = preg_replace('/(\.\w+$)/', '', strtolower($imp));
123
-                                } else {
123
+                                }else {
124 124
                                     $pl->key = strtolower($imp);
125 125
                                 }
126 126
                                 $pl->value = $imp;
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
                                 $pl->save();
129 129
 
130 130
                                 \Log::info('Saved basepath: '.$filename);
131
-                            } else {
131
+                            }else {
132 132
                                 \Log::info('Empty basepath: '.$filename);
133 133
                             }
134 134
                         }
135 135
                     }
136 136
                 }
137 137
                 @$zip->close();
138
-            } else {
138
+            }else {
139 139
                 continue;
140 140
             }
141 141
 
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 
192 192
         if (starts_with(strtolower($filepath), $searcharray)) {
193 193
             $imp = str_replace('/', '\\/', $filepath);
194
-        } else {
194
+        }else {
195 195
             if (str_contains(strtolower($filepath), $searcharray)) {
196 196
                 $exp = explode('/', $filepath);
197 197
                 $res = array_shift($exp);
198 198
                 $imp = implode('/', $exp);
199 199
                 $imp = $this->search_for_base_path($imp);
200
-            } else {
200
+            }else {
201 201
                 $imp = '';
202 202
             }
203 203
         }
Please login to merge, or discard this patch.
app/Console/Commands/PlayerRar2Zip.php 2 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -93,6 +93,9 @@  discard block
 block discarded – undo
93 93
         }
94 94
     }
95 95
 
96
+    /**
97
+     * @param string $path
98
+     */
96 99
     public function Delete($path)
97 100
     {
98 101
         // check for directory is not a file
@@ -122,6 +125,10 @@  discard block
 block discarded – undo
122 125
         return false;
123 126
     }
124 127
 
128
+    /**
129
+     * @param string $source
130
+     * @param string $destination
131
+     */
125 132
     public function Zip($source, $destination)
126 133
     {
127 134
         // check for php_zip extension and file existance
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         foreach ($files as $f) {
52 52
             //Check for maker engine 2=rm2k, 3=rm2k3, 9=rm2k3 Steam Edition
53
-            if (! array_search($f->game->maker_id, [2, 3, 6, 9, 11]) === false) {
53
+            if (!array_search($f->game->maker_id, [2, 3, 6, 9, 11]) === false) {
54 54
                 echo "Gamefile: $f->filename";
55 55
 
56 56
                 //prepare the path variables
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $this->Zip($pathdest, $pathzip);
72 72
 
73 73
                 // Check for zip file
74
-                if(!file_exists($pathzip)){
74
+                if (!file_exists($pathzip)) {
75 75
                     // zip file does not exist. debug & die.
76 76
                     dd($pathzip);
77 77
                 }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     public function Zip($source, $destination)
126 126
     {
127 127
         // check for php_zip extension and file existance
128
-        if (! extension_loaded('zip') || ! file_exists($source)) {
128
+        if (!extension_loaded('zip') || !file_exists($source)) {
129 129
             return false;
130 130
         }
131 131
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $zip = new \ZipArchive();
134 134
 
135 135
         // Create a new ZIP
136
-        if (! $zip->open($destination, \ZIPARCHIVE::CREATE)) {
136
+        if (!$zip->open($destination, \ZIPARCHIVE::CREATE)) {
137 137
             return false;
138 138
         }
139 139
 
Please login to merge, or discard this patch.
app/Helpers/PlayerHelper.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@  discard block
 block discarded – undo
11 11
 
12 12
 class PlayerHelper
13 13
 {
14
+    /**
15
+     * @param string $data
16
+     */
14 17
     public static function getSavegameValidation($data)
15 18
     {
16 19
         $br = new BinaryReader($data);
@@ -27,6 +30,9 @@  discard block
 block discarded – undo
27 30
         }
28 31
     }
29 32
 
33
+    /**
34
+     * @return string
35
+     */
30 36
     public function getZipRootPath($zipfilepath)
31 37
     {
32 38
         $dirarray = [
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
         if ($returned == 'LcfSaveData') {
24 24
             return true;
25
-        } else {
25
+        }else {
26 26
             return false;
27 27
         }
28 28
     }
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 
71 71
         if (starts_with(strtolower($zipfilepath), $searcharray)) {
72 72
             $imp = str_replace('/', '\\/', $zipfilepath);
73
-        } else {
73
+        }else {
74 74
             if (str_contains(strtolower($zipfilepath), $searcharray)) {
75 75
                 $exp = explode('/', $zipfilepath);
76 76
                 $res = array_shift($exp);
77 77
                 $imp = implode('/', $exp);
78 78
                 $imp = $this->getZipRootPath($imp);
79
-            } else {
79
+            }else {
80 80
                 $imp = '';
81 81
             }
82 82
         }
Please login to merge, or discard this patch.
app/Helpers/SearchFilterHelper.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@
 block discarded – undo
12 12
 
13 13
 class SearchFilterHelper
14 14
 {
15
+    /**
16
+     * @param string $searchterm
17
+     */
15 18
     public static function searchFilter($searchterm)
16 19
     {
17 20
         $result = [];
Please login to merge, or discard this patch.