Passed
Pull Request — master (#648)
by John
12:24 queued 05:40
created
app/Http/Middleware/TrustProxies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      *
20 20
      * @var int
21 21
      */
22
-    protected $headers = Request::HEADER_X_FORWARDED_ALL;
22
+    protected $headers=Request::HEADER_X_FORWARDED_ALL;
23 23
 }
Please login to merge, or discard this patch.
app/Models/ResponseModel.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             $statusCode=200;
15 15
         }
16 16
         $output=[
17
-             'ret' => $statusCode,
17
+                'ret' => $statusCode,
18 18
             'desc' => is_null($desc) ? self::desc($statusCode) : $desc,
19 19
             'data' => $data
20 20
         ];
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             $statusCode=1000;
28 28
         }
29 29
         $output=[
30
-             'ret' => $statusCode,
30
+                'ret' => $statusCode,
31 31
             'desc' => is_null($desc) ? self::desc($statusCode) : $desc,
32 32
             'data' => $data
33 33
         ];
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
             '451'  => "Unavailable For Legal Reasons",
45 45
 
46 46
             '1000' => "Unspecified Response", /** Under normal condictions those errors shouldn't been displayed to end users
47
-                                                 *  unless they attempt to do so, some submissions should be intercepted
48
-                                                 *  by the frontend before the request sended
49
-                                                 */
47
+             *  unless they attempt to do so, some submissions should be intercepted
48
+             *  by the frontend before the request sended
49
+             */
50 50
             '1001' => "Internal Sever Error",
51 51
             '1002' => "Service Currently Unavailable",
52 52
             '1003' => "Missing Params",
Please login to merge, or discard this patch.
app/Http/Controllers/OAuth/AAuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
                 if (config('app.allow_oauth_temp_account')) {
81 81
                     try {
82 82
                         $createdUser=User::create([
83
-                            'name' => $aauth_user->name."#".substr($aauth_user->id , 0 , 4),
83
+                            'name' => $aauth_user->name."#".substr($aauth_user->id, 0, 4),
84 84
                             'email' => Str::random(16)."@temporary.email",
85 85
                             'password' => '',
86 86
                             'avatar' => '/static/img/avatar/default.png',
Please login to merge, or discard this patch.
app/Models/ProblemModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
         $preQuery=DB::table($this->table)->where('hide', '=', 0);
297 297
         if ($filter['oj']) {
298 298
             $OJ=OJ::find($filter['oj']);
299
-            if(blank($OJ) || !$OJ->status) {
299
+            if (blank($OJ) || !$OJ->status) {
300 300
                 return null;
301 301
             }
302 302
             $preQuery=$preQuery->where(["OJ"=>$filter['oj']]);
Please login to merge, or discard this patch.
app/Models/Eloquent/Tool/MonacoTheme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@
 block discarded – undo
299 299
 
300 300
     public static function getTheme($id) {
301 301
         if (!isset(self::$theme[$id])) {
302
-            if(isset(self::$theme[config('app.editor_theme')])){
302
+            if (isset(self::$theme[config('app.editor_theme')])) {
303 303
                 return self::$theme[config('app.editor_theme')];
304 304
             }
305 305
             return self::$theme['material-design-darker'];
Please login to merge, or discard this patch.
app/Models/AccountModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
                 Cache::tags(['bing', 'pic'])->put(date("Y-m-d"), "/static/img/themes/bing/".date("Y-m-d").".jpg");
126 126
             }
127 127
             $ret["image"]=Cache::tags(['bing', 'pic'])->get(date("Y-m-d"));
128
-        } catch(Exception $e) {
128
+        } catch (Exception $e) {
129 129
             $ret["image"]="/static/img/themes/material.png";
130 130
         }
131 131
         return $ret;
Please login to merge, or discard this patch.
app/Admin/Controllers/DojoController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@
 block discarded – undo
148 148
             $form->number('order', __('admin.dojos.order'))->default(0)->rules('required');
149 149
             $form->multipleSelect('precondition', __('admin.dojos.precondition'))->options(Dojo::all()->pluck('name', 'id'));
150 150
             $form->hasMany('problems', __('admin.dojos.problems'), function(Form\NestedForm $form) {
151
-                $form->select('problem_id', __('admin.dojos.problem'))->options(function ($pid) {
152
-                    $problem = Problem::find($pid);
151
+                $form->select('problem_id', __('admin.dojos.problem'))->options(function($pid) {
152
+                    $problem=Problem::find($pid);
153 153
                     if ($problem) {
154 154
                         return [$problem->pid => $problem->readable_name];
155 155
                     }
Please login to merge, or discard this patch.
app/Admin/Controllers/GroupController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,8 @@
 block discarded – undo
139 139
             ])->default(1);
140 140
             $form->image('img', 'Custom Group Focus Image')->uniqueName()->move("static/img/group");
141 141
             if ($form->isCreating()) {
142
-                $form->select('leader_uid', 'Group Leader')->options(function ($id) {
143
-                    $user = User::find($id);
142
+                $form->select('leader_uid', 'Group Leader')->options(function($id) {
143
+                    $user=User::find($id);
144 144
                     if ($user) {
145 145
                         return [$user->id => $user->readable_name];
146 146
                     }
Please login to merge, or discard this patch.
app/Admin/Controllers/ContestController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
         $form=new Form(new Contest);
138 138
         $form->tab('Basic', function(Form $form) {
139 139
             $form->select('gid', 'Contest Creator Group')->options(Group::all()->pluck('name', 'gid'))->required();
140
-            $form->select('assign_uid', 'Contest Assign User')->options(function ($id) {
141
-                $user = User::find($id);
140
+            $form->select('assign_uid', 'Contest Assign User')->options(function($id) {
141
+                $user=User::find($id);
142 142
                 if ($user) {
143 143
                     return [$user->id => $user->readable_name];
144 144
                 }
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
                     $ncodeArr[$alpha]=$alpha;
211 211
                 }
212 212
                 $form->select('ncode', 'Problem Alphabetical Index')->options($ncodeArr)->default("A")->required();
213
-                $form->select('pid', 'Problem')->options(function ($pid) {
214
-                    $problem = Problem::find($pid);
213
+                $form->select('pid', 'Problem')->options(function($pid) {
214
+                    $problem=Problem::find($pid);
215 215
                     if ($problem) {
216 216
                         return [$problem->pid => $problem->readable_name];
217 217
                     }
Please login to merge, or discard this patch.