Completed
Push — master ( 708e0f...086c8f )
by Christian
15:31 queued 07:00
created
html/inc/account.inc 3 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -18,6 +18,10 @@  discard block
 block discarded – undo
18 18
 
19 19
 // forms for account creation and login
20 20
 
21
+/**
22
+ * @param integer $teamid
23
+ * @param string $next_url
24
+ */
21 25
 function create_account_form($teamid, $next_url) {
22 26
     global $recaptcha_public_key;
23 27
     echo "
@@ -92,6 +96,9 @@  discard block
 block discarded – undo
92 96
     echo "</form>\n";
93 97
 }
94 98
 
99
+/**
100
+ * @param string $next_url
101
+ */
95 102
 function login_form($next_url) {
96 103
     echo "
97 104
         <form name=\"f\" method=\"post\" action=\"".secure_url_base()."/login_action.php\">
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
     // Using invitation codes to restrict access?
36 36
     //
37 37
     if (defined('INVITE_CODES')) {
38
-         row2(
39
-             tra("Invitation Code")."<br><small>".tra("A valid invitation code is required to create an account.")."</small>",
40
-             '<input class="form-control" type="text" name="invite_code" size="30" >'
41
-         );
38
+            row2(
39
+                tra("Invitation Code")."<br><small>".tra("A valid invitation code is required to create an account.")."</small>",
40
+                '<input class="form-control" type="text" name="invite_code" size="30" >'
41
+            );
42 42
     }
43 43
 
44 44
     row2(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
         $x .= '<br><small><a href="get_passwd.php">'.tra("forgot email address?")."</a></small>";
108 108
     }
109 109
     row2($x, '<input class="form-control" name=email_addr type="text" size=40 tabindex=1>');
110
-    row2(tra("Password:") . '<br><small><a href="get_passwd.php">' . tra("forgot password?") . "</a></small>",
110
+    row2(tra("Password:").'<br><small><a href="get_passwd.php">'.tra("forgot password?")."</a></small>",
111 111
         '<input class="form-control" type="password" name="passwd" size="40" tabindex="2">'
112 112
     );
113 113
     row2(tra("Stay logged in"),
Please login to merge, or discard this patch.
html/inc/akismet.inc 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
     }
53 53
 }
54 54
 
55
+/**
56
+ * @param string $path
57
+ */
55 58
 function akismet_request($request, $host, $path, $port = 80) {
56 59
     $http_request  = "POST $path HTTP/1.0\r\n";
57 60
     $http_request .= "Host: $host\r\n";
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     $master_url_enc = urlencode($master_url);
28 28
     $response = akismet_request("key=$key&blog=$master_url_enc", "rest.akismet.com", "/1.1/verify-key");
29
-    if ("valid" == $response[1] ) {
29
+    if ("valid" == $response[1]) {
30 30
         $post = urlencode($post);
31 31
         $ip = urlencode($_SERVER['REMOTE_ADDR']);
32 32
         $referrer = urlencode($_SERVER['HTTP_REFERER']);
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
     $http_request  = "POST $path HTTP/1.0\r\n";
57 57
     $http_request .= "Host: $host\r\n";
58 58
     $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
59
-    $http_request .= "Content-Length: " . strlen($request) . "\r\n";
59
+    $http_request .= "Content-Length: ".strlen($request)."\r\n";
60 60
     $http_request .= "User-Agent: BOINC | Akismet 1.1\r\n";
61 61
     $http_request .= "\r\n";
62 62
     $http_request .= $request;
63 63
 
64 64
     $response = '';
65
-    if( false !== ( $fs = @fsockopen($host, $port, $errno, $errstr, 3) ) ) {
65
+    if (false !== ($fs = @fsockopen($host, $port, $errno, $errstr, 3))) {
66 66
         fwrite($fs, $http_request);
67
-        while ( !feof($fs) )
67
+        while (!feof($fs))
68 68
             $response .= fgets($fs, 1160); // One TCP-IP packet
69 69
         fclose($fs);
70 70
         $response = explode("\r\n\r\n", $response, 2);
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
         $response = akismet_request($request, "$key.rest.akismet.com", "/1.1/comment-check");
44 44
 
45
-        if ("true" == $response[1]) { // Akismet says it's spam
45
+        if ("true" == $response[1]) {
46
+// Akismet says it's spam
46 47
             return false;
47 48
         } else {
48 49
             return true;
@@ -64,8 +65,10 @@  discard block
 block discarded – undo
64 65
     $response = '';
65 66
     if( false !== ( $fs = @fsockopen($host, $port, $errno, $errstr, 3) ) ) {
66 67
         fwrite($fs, $http_request);
67
-        while ( !feof($fs) )
68
-            $response .= fgets($fs, 1160); // One TCP-IP packet
68
+        while ( !feof($fs) ) {
69
+                    $response .= fgets($fs, 1160);
70
+        }
71
+        // One TCP-IP packet
69 72
         fclose($fs);
70 73
         $response = explode("\r\n\r\n", $response, 2);
71 74
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 }
54 54
 
55 55
 function akismet_request($request, $host, $path, $port = 80) {
56
-    $http_request  = "POST $path HTTP/1.0\r\n";
56
+    $http_request  = "post $path HTTP/1.0\r\n";
57 57
     $http_request .= "Host: $host\r\n";
58 58
     $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
59 59
     $http_request .= "Content-Length: " . strlen($request) . "\r\n";
Please login to merge, or discard this patch.
html/inc/bolt.inc 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -246,6 +246,9 @@  discard block
 block discarded – undo
246 246
 
247 247
 }
248 248
 
249
+/**
250
+ * @param string $n
251
+ */
249 252
 function name($n) {
250 253
     return array('name', $n);
251 254
 }
@@ -254,10 +257,16 @@  discard block
 block discarded – undo
254 257
     return array('title', $n);
255 258
 }
256 259
 
260
+/**
261
+ * @param integer $n
262
+ */
257 263
 function number($n) {
258 264
     return array('number', $n);
259 265
 }
260 266
 
267
+/**
268
+ * @param string $n
269
+ */
261 270
 function filename($n) {
262 271
     return array('filename', $n);
263 272
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public $title;
31 31
         // Optional; used when showing course history outline.
32 32
     public $is_item;
33
-    public $attrs;        // course-defined
33
+    public $attrs; // course-defined
34 34
 
35 35
     abstract function walk(&$iter, $incr, &$frac_done);
36 36
         // multi-purpose function for traversing a course.
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             $this->query_string = null;
56 56
         } else {
57 57
             $this->filename = substr($filename, 0, $p);
58
-            $this->query_string = substr($filename, $p+1);
58
+            $this->query_string = substr($filename, $p + 1);
59 59
         }
60 60
         $this->name = $filename;
61 61
         $this->title = $title;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             // look up unit by name
163 163
             //
164 164
             $child = null;
165
-            for ($i=0; $i<$n; $i++) {
165
+            for ($i = 0; $i < $n; $i++) {
166 166
                 $c = $this->units[$i];
167 167
                 if ($c->name == $child_name) {
168 168
                     $child = $c;
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 if ($i >= $n) {
178 178
                     // and if index is too big, use last unit
179 179
                     //
180
-                    $i = $n-1;
180
+                    $i = $n - 1;
181 181
                 }
182 182
                 $child = $this->units[$i];
183 183
             }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                         $this->finished($iter);
198 198
                         return true;
199 199
                     } else {
200
-                        $i = ($i+1)%$n;
200
+                        $i = ($i + 1)%$n;
201 201
                     }
202 202
                 }
203 203
             }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         if (array_key_exists($this->name, $state)) {
236 236
             $state_rec = $state[$this->name];
237 237
             $child_name = $state_rec['child_name'];
238
-            foreach($this->units as $c) {
238
+            foreach ($this->units as $c) {
239 239
                 if ($c->name == $child_name) {
240 240
                     return $c;
241 241
                 }
Please login to merge, or discard this patch.
html/inc/bolt_ex.inc 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -240,6 +240,10 @@  discard block
 block discarded – undo
240 240
 
241 241
 class BoltFitbField {
242 242
     public $textarea, $nrows, $ncols;
243
+
244
+    /**
245
+     * @param boolean $textarea
246
+     */
243 247
     function __construct($textarea, $nrows, $ncols) {
244 248
         $this->textarea = $textarea;
245 249
         $this->nrows = $nrows;
@@ -258,6 +262,10 @@  discard block
 block discarded – undo
258 262
 class BoltFitbAnswer {
259 263
     public $type;   // 0=constant, 1=regexp, 2=func
260 264
     public $ans;
265
+
266
+    /**
267
+     * @param integer $type
268
+     */
261 269
     function __construct($type, $ans) {
262 270
         $this->type = $type;
263 271
         $this->ans = $ans;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 // The following is a global var accessed by exercise functions.
22 22
 //
23 23
 $bolt_ex = null;
24
-$bolt_ex->mode = 0;     // input: SHOW/SCORE/ANSWER
25
-$bolt_ex->index = 0;    // input: sequence of this exercise in file
26
-$bolt_ex->score = 0;    // input/output: cumulative score (if mode = SCORE)
27
-$bolt_ex->weight = 0;   // input/output: cumulative weight
28
-$bolt_ex->query_string = "";    // user's response (if SCORE or ANSWER)
24
+$bolt_ex->mode = 0; // input: SHOW/SCORE/ANSWER
25
+$bolt_ex->index = 0; // input: sequence of this exercise in file
26
+$bolt_ex->score = 0; // input/output: cumulative score (if mode = SCORE)
27
+$bolt_ex->weight = 0; // input/output: cumulative weight
28
+$bolt_ex->query_string = ""; // user's response (if SCORE or ANSWER)
29 29
 
30 30
 function weight($w) {
31 31
     return array('weight', $w);
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
             $response = isset($$key);
171 171
             $r = $choice[1];
172 172
             $correct = ($r && $response) || (!$r && !$response);
173
-            $color = $correct?"#88ff88":"#ff8888";
174
-            table_row($c, $r?"yes":"no",
175
-                array($response?"yes":"no", "bgcolor=$color")
173
+            $color = $correct ? "#88ff88" : "#ff8888";
174
+            table_row($c, $r ? "yes" : "no",
175
+                array($response ? "yes" : "no", "bgcolor=$color")
176 176
             );
177 177
             $i++;
178 178
         }
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
         if ($y > $rect[3]) $right = false;
216 216
         $cx = $rect[0];
217 217
         $cy = $rect[2];
218
-        $sizex = $rect[1]-$rect[0];
219
-        $sizey = $rect[3]-$rect[2];
220
-        $ax = $x-4;
221
-        $ay = $y-4;
222
-        $color = $right?"green":"red";
218
+        $sizex = $rect[1] - $rect[0];
219
+        $sizey = $rect[3] - $rect[2];
220
+        $ax = $x - 4;
221
+        $ay = $y - 4;
222
+        $color = $right ? "green" : "red";
223 223
         if ($right) {
224 224
             echo "The point you selected (shown in green) is correct.";
225 225
         } else {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 }
257 257
 
258 258
 class BoltFitbAnswer {
259
-    public $type;   // 0=constant, 1=regexp, 2=func
259
+    public $type; // 0=constant, 1=regexp, 2=func
260 260
     public $ans;
261 261
     function __construct($type, $ans) {
262 262
         $this->type = $type;
Please login to merge, or discard this patch.
html/inc/bolt_select.inc 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
     }
53 53
 }
54 54
 
55
+/**
56
+ * @param string $n
57
+ */
55 58
 function valuator($n) {
56 59
     return array('valuator', $n);
57 60
 }
Please login to merge, or discard this 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
 function select_cmp($a, $b) {
20 20
     if ($a->value == $b->value) return 0;
21
-    return ($a->value < $b->value)?1:-1;
21
+    return ($a->value < $b->value) ? 1 : -1;
22 22
 }
23 23
 
24 24
 class BoltSelect extends BoltSet {
Please login to merge, or discard this patch.
html/inc/bolt_snap.inc 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@  discard block
 block discarded – undo
45 45
     return "../bolt_snap/compare_snapshot_$x";
46 46
 }
47 47
 
48
+/**
49
+ * @param null|integer $dur
50
+ */
48 51
 function write_compare_snapshot($course_id, $select_name, $xset_name, $dur) {
49 52
     $now = time();
50 53
     $start = $now - $dur*86400;
@@ -127,6 +130,9 @@  discard block
 block discarded – undo
127 130
     return "../bolt_snap/map_snapshot_".$course_id;
128 131
 }
129 132
 
133
+/**
134
+ * @param null|integer $dur
135
+ */
130 136
 function write_map_snapshot($course_id, $dur) {
131 137
     $now = time();
132 138
     $start = $now - $dur*86400;
Please login to merge, or discard this patch.
html/inc/bolt_util_ops.inc 2 patches
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
 
24 24
 // get names of units of a given type
25 25
 
26
+/**
27
+ * @param string $type
28
+ */
26 29
 function units_of_type($unit, $type) {
27 30
     $names = array();
28 31
     if (get_class($unit) == $type) {
@@ -118,6 +121,10 @@  discard block
 block discarded – undo
118 121
 
119 122
 //////////// graph drawing
120 123
 
124
+/**
125
+ * @param integer $n
126
+ * @param integer $width
127
+ */
121 128
 function compare_bar($title, $n, $width, $lo, $hi) {
122 129
     $x1 = $width*$lo;
123 130
     $x2 = $width*($hi-$lo);
@@ -137,6 +144,9 @@  discard block
 block discarded – undo
137 144
     ";
138 145
 }
139 146
 
147
+/**
148
+ * @param integer $width
149
+ */
140 150
 function compare_bar_insuff($title, $width) {
141 151
     return "
142 152
         <tr>
@@ -150,6 +160,10 @@  discard block
 block discarded – undo
150 160
     ";
151 161
 }
152 162
 
163
+/**
164
+ * @param integer[] $x
165
+ * @param integer $width
166
+ */
153 167
 function outcome_graph($x, $width) {
154 168
     $n = $x[0]+$x[1]+$x[2];
155 169
     if (!$n) return empty_cell();
@@ -182,6 +196,9 @@  discard block
 block discarded – undo
182 196
     return $s;
183 197
 }
184 198
 
199
+/**
200
+ * @param integer $w
201
+ */
185 202
 function time_graph($t, $w) {
186 203
     if ($t == 0) return "<td>---</td>";
187 204
     $x = (log10($t)+2)*$w/4;
@@ -193,6 +210,10 @@  discard block
 block discarded – undo
193 210
     </td>";
194 211
 }
195 212
 
213
+/**
214
+ * @param integer $t
215
+ * @param integer $w
216
+ */
196 217
 function score_graph($t, $w) {
197 218
     if ($t == 0) return "<td>---</td>";
198 219
     $x = $t*$w;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
         $n++;
90 90
         $delta = $x - $m;
91 91
         $m += $delta/$n;
92
-        $m2 += $delta*($x-$m);
92
+        $m2 += $delta*($x - $m);
93 93
     }
94 94
     $mean = $m;
95
-    $stdev = sqrt($m2/($n-1));
95
+    $stdev = sqrt($m2/($n - 1));
96 96
 }
97 97
 
98 98
 // approximate the 90% confidence interval for the mean of an array
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 
104 104
     // I'm too lazy to compute the t distribution
105 105
     $t_90 = 1.7;
106
-    $d = $t_90 * $stdev / sqrt($n);
106
+    $d = $t_90*$stdev/sqrt($n);
107 107
     $lo = $mean - $d;
108 108
     $hi = $mean + $d;
109 109
 }
110 110
 
111 111
 function test_stats() {
112
-    $a = array(1,1,1,1,0,1,1,1,3, 1, 1, 1, 1);
112
+    $a = array(1, 1, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1);
113 113
     mean_stdev($a, $mean, $stdev);
114 114
     echo "mean: $mean stdev: $stdev\n";
115 115
     conf_int_90($a, $lo, $hi);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 function compare_bar($title, $n, $width, $lo, $hi) {
122 122
     $x1 = $width*$lo;
123
-    $x2 = $width*($hi-$lo);
123
+    $x2 = $width*($hi - $lo);
124 124
     $a1 = number_format($lo*100);
125 125
     $a2 = number_format($hi*100);
126 126
     return "
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
 }
152 152
 
153 153
 function outcome_graph($x, $width) {
154
-    $n = $x[0]+$x[1]+$x[2];
154
+    $n = $x[0] + $x[1] + $x[2];
155 155
     if (!$n) return empty_cell();
156 156
     $x0 = $width*$x[1]/$n;
157 157
     $x1 = $width*$x[0]/$n;
158 158
     $x2 = $width*$x[2]/$n;
159
-    if ($x[1]/$n>0.05) {
159
+    if ($x[1]/$n > 0.05) {
160 160
         $t0 = number_format(100*$x[1]/$n)."%";
161 161
     } else {
162 162
         $t0 = "";
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 function time_graph($t, $w) {
186 186
     if ($t == 0) return "<td>---</td>";
187
-    $x = (log10($t)+2)*$w/4;
187
+    $x = (log10($t) + 2)*$w/4;
188 188
     $t = number_format($t, 1);
189 189
     return "<td>
190 190
         <table class=bolt_bar><tr>
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 function score_graph($t, $w) {
197 197
     if ($t == 0) return "<td>---</td>";
198 198
     $x = $t*$w;
199
-    $y = (1-$t)*$w;
199
+    $y = (1 - $t)*$w;
200 200
     $t = number_format($t*100);
201 201
     $s = "<td>
202 202
         <table class=bolt_bar><tr>
Please login to merge, or discard this patch.
html/inc/bolt_xset.inc 3 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@  discard block
 block discarded – undo
22 22
     public $weight;
23 23
     public $callback;
24 24
 
25
+    /**
26
+     * @param null|BoltRefresh $refresh
27
+     */
25 28
     function __construct(
26 29
         $name, $units, $number, $repeats, $refresh, $attrs, $callback, $weight
27 30
     ) {
@@ -156,10 +159,16 @@  discard block
 block discarded – undo
156 159
 define('REPEAT', 2);
157 160
 define('NEXT', 4);
158 161
 
162
+/**
163
+ * @param integer $f
164
+ */
159 165
 function repeat($s, $u, $f) {
160 166
     return new BoltRepeat($s, $u, $f);
161 167
 }
162 168
 
169
+/**
170
+ * @param integer[] $a
171
+ */
163 172
 function refresh($a) {
164 173
     return new BoltRefresh($a);
165 174
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $nshown = $state_rec['nshown'];
53 53
         $state_rec['scores'][$nshown] = $score;
54 54
         $iter->state[$this->name] = $state_rec;
55
-        $is_last = ($nshown+1 == $this->ntoshow);
55
+        $is_last = ($nshown + 1 == $this->ntoshow);
56 56
         if (!$is_last) {
57 57
             return false;
58 58
         }
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
         //   - optionally create or update bolt_refresh record
63 63
         //
64 64
         $total_score = 0;
65
-        for ($i=0; $i<$nshown+1; $i++) {
65
+        for ($i = 0; $i < $nshown + 1; $i++) {
66 66
             $total_score += $state_rec['scores'][$i];
67 67
         }
68
-        $avg_score = $total_score/($nshown+1);
68
+        $avg_score = $total_score/($nshown + 1);
69 69
 
70 70
         $repeat = null;
71 71
         $least = 2;
72 72
         foreach ($this->repeats as $r) {
73
-            if ($avg_score < $r->score && $r->score<$least) {
73
+            if ($avg_score < $r->score && $r->score < $least) {
74 74
                 $repeat = $r;
75 75
                 $least = $r->score;
76 76
             }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     }
135 135
 }
136 136
 
137
-class BoltRefresh{
137
+class BoltRefresh {
138 138
     public $intervals;
139 139
     function __construct($i) {
140 140
         $this->intervals = $i;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             } else if (get_class($arg) == "BoltRepeat") {
192 192
                 $repeats[] = $arg;
193 193
             } else if (get_class($arg) == "BoltRefresh") {
194
-                $refresh= $arg;
194
+                $refresh = $arg;
195 195
             } else {
196 196
                 echo "Can't include object of type ".get_class($arg)." within an exercise set.";
197 197
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     }
135 135
 }
136 136
 
137
-class BoltRefresh{
137
+class BoltRefresh {
138 138
     public $intervals;
139 139
     function __construct($i) {
140 140
         $this->intervals = $i;
Please login to merge, or discard this patch.
html/inc/bossa.inc 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@
 block discarded – undo
38 38
     return $job->insert($clause);
39 39
 }
40 40
 
41
+/**
42
+ * @param string $name
43
+ */
41 44
 function bossa_batch_create($appid, $name, $calibration) {
42 45
     $now = time();
43 46
     $c = $calibration?"1":"0";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
 function bossa_batch_create($appid, $name, $calibration) {
42 42
     $now = time();
43
-    $c = $calibration?"1":"0";
43
+    $c = $calibration ? "1" : "0";
44 44
     return BossaBatch::insert("(create_time, app_id, name, calibration) values ($now, $appid, '$name', $c)");
45 45
 }
46 46
 
Please login to merge, or discard this patch.