Passed
Push — master ( 8c7895...0eb6ac )
by
unknown
06:03
created
src/app/models/breakin_model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             "INSERT INTO `breakin_teams`
49 49
             (`nick1`, `nick2`, `team_name`) VALUES  (?, ?, ?)",
50 50
             "sss",
51
-            [ $info['nick1'], $info['nick2'], $info['team_name'] ?: $info['nick1'] ],
51
+            [$info['nick1'], $info['nick2'], $info['team_name'] ?: $info['nick1']],
52 52
             false
53 53
         );
54 54
     }
Please login to merge, or discard this patch.
src/app/models/sap_model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             [$email]
33 33
         );
34 34
         $row = $stmt->get_result()->fetch_row();
35
-        if (! $row) {
35
+        if (!$row) {
36 36
             return false;
37 37
         }
38 38
         if (password_verify($password, $row[1])) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             [$email]
50 50
         );
51 51
         $row = $stmt->get_result()->fetch_row();
52
-        if (! $row) {
52
+        if (!$row) {
53 53
             return false;
54 54
         }
55 55
         return boolval($row[0]);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             'ssss',
164 164
             [$title, $level, $points, $description]
165 165
         );
166
-        if (! $stmt) {
166
+        if (!$stmt) {
167 167
             return false;
168 168
         }
169 169
         return $stmt->insert_id;
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 WHERE `tasks`.`mission_id`=?
285 285
 SQL;
286 286
         if (!$approved) {
287
-            $query .=  " AND `task_submissions`.`done` = 0";
287
+            $query .= " AND `task_submissions`.`done` = 0";
288 288
         } else {
289
-            $query .=  " AND `task_submissions`.`done` = 1";
289
+            $query .= " AND `task_submissions`.`done` = 1";
290 290
         }
291 291
 
292 292
         $stmt = $this->db_lib->prepared_execute(
@@ -407,11 +407,11 @@  discard block
 block discarded – undo
407 407
                 [null, $user['id']],
408 408
                 false
409 409
             );
410
-        if (! $stmt) {
410
+        if (!$stmt) {
411 411
             $db_error = true;
412 412
         }
413 413
 
414
-        if (! $db_error) {
414
+        if (!$db_error) {
415 415
             $stmt = $this->db_lib->prepared_execute(
416 416
                 $this->DB->sap,
417 417
                 'INSERT INTO `sap_users` (`email`, `registration_id`, `password_hash`) VALUES (?, ?, ?)',
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
                 [$user['email'], $user['id'], password_hash($password, PASSWORD_DEFAULT)],
420 420
                 false
421 421
             );
422
-            if (! $stmt) {
422
+            if (!$stmt) {
423 423
                 $db_error = true;
424 424
             }
425 425
         }
Please login to merge, or discard this patch.
src/app/models/auth_model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->load_library("ldap_lib", "ldap");
84 84
         $ds = $this->ldap->get_link();
85 85
         $dn = "dc=felicity,dc=iiit,dc=ac,dc=in";
86
-        $filter = '(&(mail='.$email.'))';
86
+        $filter = '(&(mail=' . $email . '))';
87 87
         $sr = ldap_search($ds, $dn, $filter, array_keys($attributes));
88 88
         $entry = ldap_first_entry($ds, $sr);
89 89
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $user_data = [];
96 96
 
97 97
         foreach ($attributes as $key => $value) {
98
-            if (isset($entry_data[$key]) &&  isset($entry_data[$key][0])) {
98
+            if (isset($entry_data[$key]) && isset($entry_data[$key][0])) {
99 99
                 $user_data[$value] = $entry_data[$key][0];
100 100
             }
101 101
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         return false;
264 264
     }
265 265
 
266
-    function verify_mail($hash, $remove=true) {
266
+    function verify_mail($hash, $remove = true) {
267 267
         $stmt = $this->db_lib->prepared_execute(
268 268
             $this->DB->users,
269 269
             "SELECT `email`, `hash`, `action` FROM `mail_verify` WHERE `hash`=?",
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     function create_ldap_user($email, $password) {
293 293
         $this->load_library("ldap_lib", "ldap");
294 294
         $ds = $this->ldap->get_link();
295
-        return ldap_add($ds, "uid=".addcslashes($email, '+').",ou=users,dc=felicity,dc=iiit,dc=ac,dc=in", [
295
+        return ldap_add($ds, "uid=" . addcslashes($email, '+') . ",ou=users,dc=felicity,dc=iiit,dc=ac,dc=in", [
296 296
             "userPassword"  => "{SHA}" . base64_encode(pack("H*", sha1($password))),
297 297
             "objectClass"   => [
298 298
                 "account",
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
     function reset_ldap_password($email, $password) {
307 307
         $this->load_library("ldap_lib", "ldap");
308 308
         $ds = $this->ldap->get_link();
309
-        return ldap_mod_replace($ds, "uid=".addcslashes($email, '+').",ou=users,dc=felicity,dc=iiit,dc=ac,dc=in", [
309
+        return ldap_mod_replace($ds, "uid=" . addcslashes($email, '+') . ",ou=users,dc=felicity,dc=iiit,dc=ac,dc=in", [
310 310
             "userPassword" => "{SHA}" . base64_encode(pack("H*", sha1($password)))
311 311
         ]);
312 312
     }
Please login to merge, or discard this patch.
src/app/views/contest/ttt_workshop.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $large_text=false) use ($errors) {
2
+$text_input = function($name, $large_text = false) use ($errors) {
3 3
 ?>
4 4
     <?php if ($large_text): ?>
5 5
         <textarea name="<?= $name ?>" class="pure-input-1" required=""><?= isset($_POST[$name]) ? $_POST[$name] : '' ?></textarea>
6
-    <?php else: ?>
6
+    <?php else : ?>
7 7
         <input
8 8
             name="<?= $name ?>"
9 9
             value="<?= isset($_POST[$name]) ? $_POST[$name] : '' ?>"
Please login to merge, or discard this patch.
src/app/views/contest/futsal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $required=true) use ($errors) {
2
+$text_input = function($name, $required = true) use ($errors) {
3 3
 ?>
4 4
     <input
5 5
         name="<?= $name ?>"
Please login to merge, or discard this patch.
src/app/views/contest/visualizeit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $type="text") use ($errors) {
2
+$text_input = function($name, $type = "text") use ($errors) {
3 3
 ?>
4 4
     <input
5 5
         name="<?= $name ?>"
Please login to merge, or discard this patch.
src/app/views/contest/riderofstorms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $large_text=false, $required=true) use ($errors) {
2
+$text_input = function($name, $large_text = false, $required = true) use ($errors) {
3 3
 ?>
4 4
     <?php if ($large_text): ?>
5 5
         <textarea name="<?= $name ?>" class="pure-input-1" <?php if ($required): ?>required=""<?php endif; ?> ><?= isset($_POST[$name]) ? $_POST[$name] : '' ?></textarea>
6
-    <?php else: ?>
6
+    <?php else : ?>
7 7
         <input
8 8
             name="<?= $name ?>"
9 9
             value="<?= isset($_POST[$name]) ? $_POST[$name] : '' ?>"
Please login to merge, or discard this patch.
src/app/views/contest/breakin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
                 You're registered for the event
12 12
                 <?php if ($team_info['nick2']): ?>
13 13
                     as a team with <?= $team_info['nick2'] == $user_nick ? $team_info['nick1'] : $team_info['nick2'] ?>.
14
-                <?php else: ?>
14
+                <?php else : ?>
15 15
                     as individual.
16 16
                 <?php endif; ?>
17 17
                 <?php if ($team_info['team_name']): ?>
Please login to merge, or discard this patch.
src/app/views/templates/team/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php $this->load_fragment('skeleton_template/header'); ?>
2 2
 <article class="page team">
3 3
 <?php
4
-function img($img_name, $name=null) {
4
+function img($img_name, $name = null) {
5 5
 ?>
6 6
     <div class="img-container<?=$name ? '' : ' group-pic' ?>" style="transform: rotate(<?= 2 - rand(1, 4) ?>deg)">
7 7
         <img src="<?=base_url()?>static/images/team/<?=$img_name?>">
Please login to merge, or discard this patch.