Test Failed
Branch devel (807472)
by Litera
06:16
created
app/services/SkautisAuthenticator.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
  * Never let user to set his ID himself.
10 10
  * @author Hána František <[email protected]>
11 11
  */
12
-class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator
13
-{
12
+class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator
13
+{
14 14
 
15
-	public function authenticate(array $credentials)
16
-	{
15
+	public function authenticate(array $credentials)
16
+	{
17 17
 		$data = $credentials[0];
18 18
 		return new Nette\Security\Identity($data->ID_User);
19 19
 	}
Please login to merge, or discard this patch.
app/models/BlockModel.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,11 @@
 block discarded – undo
88 88
 		$html_select = "<select style='width: 300px; font-size: 10px' name='block'>\n";
89 89
 
90 90
 		foreach($result as $data){
91
-			if($data['id'] == $blockId) $selected = "selected";
92
-			else $selected = "";
91
+			if($data['id'] == $blockId) {
92
+				$selected = "selected";
93
+			} else {
94
+				$selected = "";
95
+			}
93 96
 			$html_select .= "<option ".$selected." value='".$data['id']."'>".$data['day'].", ".$data->from->format('%H:%I:%S')." - ".$data->to->format('%H:%I:%S')." : ".$data['name']."</option>\n";
94 97
 		}
95 98
 		$html_select .= "</select>\n";
Please login to merge, or discard this patch.
app/models/ProgramModel.php 1 patch
Braces   +39 added lines, -22 removed lines patch added patch discarded remove patch
@@ -114,8 +114,11 @@  discard block
 block discarded – undo
114 114
 			}
115 115
 
116 116
 			// pokud uz jednou bylo zaskrtnuto, nezaskrtavam znovu
117
-			if(!$checked_flag) $checked = "checked='checked'";
118
-			else $checked = "";
117
+			if(!$checked_flag) {
118
+				$checked = "checked='checked'";
119
+			} else {
120
+				$checked = "";
121
+			}
119 122
 
120 123
 			$html .= "<input ".$checked." type='radio' name='blck_".$blockId."' value='0' /> Nebudu přítomen <br />\n";
121 124
 			$html .= $html_input;
@@ -152,8 +155,7 @@  discard block
 block discarded – undo
152 155
 				if($fullProgramData['visitors'] >= $data['capacity']){
153 156
 					//$html .= "<input disabled type='radio' name='".$id."' value='".$data['id']."' />\n";
154 157
 					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>".$fullProgramData['visitors']."/".$data['capacity']."</span> (kapacita programu je naplněna!)";
155
-				}
156
-				else {
158
+				} else {
157 159
 					//$html .= "<input type='radio' name='".$id."' value='".$data['id']."' /> \n";
158 160
 					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>".$fullProgramData['visitors']."/".$data['capacity']."</span>";
159 161
 				}
@@ -196,7 +198,9 @@  discard block
 block discarded – undo
196 198
 
197 199
 			foreach($progSql as $progData){
198 200
 				//nemoznost volit predsnemovni dikusi
199
-				if($progData['id'] == 63) $notDisplayed = "style='display:none;'";
201
+				if($progData['id'] == 63) {
202
+					$notDisplayed = "style='display:none;'";
203
+				}
200 204
 				//obsazenost raftu
201 205
 				/*
202 206
 				elseif($raftCountData['raft'] >= 18){
@@ -204,9 +208,13 @@  discard block
 block discarded – undo
204 208
 					else $notDisplayed = "";
205 209
 				}
206 210
 				*/
207
-				else $notDisplayed = "";
211
+				else {
212
+					$notDisplayed = "";
213
+				}
208 214
 				$programs .= "<div ".$notDisplayed.">".$progData['day'].", ".$progData['from']." - ".$progData['to']." : ".$progData['name']."</div>\n";
209
-				if($progData['program'] == 1) $programs .= "<div ".$notDisplayed.">".$this->getExportPrograms($progData['id'])."</div>";
215
+				if($progData['program'] == 1) {
216
+					$programs .= "<div ".$notDisplayed.">".$this->getExportPrograms($progData['id'])."</div>";
217
+				}
210 218
 				$programs .= "<br />";
211 219
 			}
212 220
 		}
@@ -302,8 +310,7 @@  discard block
 block discarded – undo
302 310
 
303 311
 		if(!$result){
304 312
 			$html = "";
305
-		}
306
-		else{
313
+		} else{
307 314
 			$html = "<div>\n";
308 315
 			$html .= "<input ".$disabled." checked type='radio' name='".$id."' value='0' /> Nebudu přítomen <br />\n";
309 316
 			foreach($result as $data){
@@ -315,14 +322,16 @@  discard block
 block discarded – undo
315 322
 							$data['id'], '0')->fetch();
316 323
 
317 324
 				// nezobrazeni programu v registraci, v adminu zaskrtavatko u programu
318
-				if($data['display_in_reg'] == 0) $notDisplayedProg = "style='display:none;'";
319
-				else $notDisplayedProg = "";
325
+				if($data['display_in_reg'] == 0) {
326
+					$notDisplayedProg = "style='display:none;'";
327
+				} else {
328
+					$notDisplayedProg = "";
329
+				}
320 330
 
321 331
 				if($fullProgramData['visitors'] >= $data['capacity']){
322 332
 					$html .= "<div ".$notDisplayedProg."><input disabled type='radio' name='".$id."' value='".$data['id']."' />\n";
323 333
 					$fullProgramInfo = " (NELZE ZAPSAT - kapacita programu je již naplněna!)";
324
-				}
325
-				else {
334
+				} else {
326 335
 					$html .= "<div ".$notDisplayedProg."><input ".$disabled." type='radio' name='".$id."' value='".$data['id']."' /> \n";
327 336
 					$fullProgramInfo = "";
328 337
 				}
@@ -369,7 +378,8 @@  discard block
 block discarded – undo
369 378
 		}
370 379
 	}
371 380
 
372
-	public function getSelectedPrograms($visitorId) {
381
+	public function getSelectedPrograms($visitorId)
382
+	{
373 383
 		$programs = "  <div style='border-bottom:1px solid black;text-align:right;'>vybrané programy</div>";
374 384
 
375 385
 		$result = $this->database
@@ -393,7 +403,8 @@  discard block
 block discarded – undo
393 403
 		return $programs;
394 404
 	}
395 405
 
396
-	public static function getPdfPrograms($id, $vid, $database){
406
+	public static function getPdfPrograms($id, $vid, $database)
407
+	{
397 408
 		$result = $database
398 409
 			->table('kk_programs')
399 410
 			->where('block ? AND deleted ?', $id, '0')
@@ -411,7 +422,9 @@  discard block
 block discarded – undo
411 422
 					->table('kk_visitor-program')
412 423
 					->where('program ? AND visitor ?', $data->id, $vid)
413 424
 					->fetchAll();
414
-				if($rows) $html .= $data['name'];
425
+				if($rows) {
426
+					$html .= $data['name'];
427
+				}
415 428
 			}
416 429
 			$html .= "</div>\n";
417 430
 		}
@@ -419,7 +432,8 @@  discard block
 block discarded – undo
419 432
 		return $html;
420 433
 	}
421 434
 
422
-	public function getProgramsLarge($id){
435
+	public function getProgramsLarge($id)
436
+	{
423 437
 		$result = $this->database
424 438
 			->query('SELECT progs.name AS name,
425 439
 						cat.style AS style
@@ -429,8 +443,9 @@  discard block
 block discarded – undo
429 443
 				LIMIT 10',
430 444
 				$id, '0')->fetchAll();
431 445
 
432
-		if(!$result) $html = "";
433
-		else {
446
+		if(!$result) {
447
+			$html = "";
448
+		} else {
434 449
 			$html = "<table>";
435 450
 			$html .= " <tr>";
436 451
 			foreach($result as $data){
@@ -453,8 +468,9 @@  discard block
 block discarded – undo
453 468
 
454 469
 		$html = '';
455 470
 
456
-		if(!$result) $html = "";
457
-		else {
471
+		if(!$result) {
472
+			$html = "";
473
+		} else {
458 474
 			foreach($result as $data){
459 475
 				$html .= $data['name'].",\n";
460 476
 			}
@@ -489,8 +505,9 @@  discard block
 block discarded – undo
489 505
 			$inner_html .= " <td class=\"label\">Obsazenost programu:</td>\n";
490 506
 			$inner_html .= " <td class=\"text\">".$countData['visitors']."/".$capacity."</td>\n";
491 507
 		    $inner_html .= "</tr>\n";
508
+		} else {
509
+			$inner_html = "";
492 510
 		}
493
-		else $inner_html = "";
494 511
 
495 512
 		$html = '<html><head><meta http-equiv="Content-Type" content="text/html; charset='.$httpEncoding.'" /></head><body><style>td.text {text-align:left;}</style><table class="form"><tr><td class="label">Program:</td><td class="text">'.$name.'</td></tr><tr><td class="label">Popis:</td><td class="text">'.$description.'</td></tr><tr><td class="label">Lektor:</td><td class="text">'.$tutor.'</td></tr><tr><td class="label">E-mail:</td><td class="text"><a href="mailto:'.$email.'" title="e-mail">'.$email.'</a></td></tr>'.$inner_html.'</table></body></html>';
496 513
 
Please login to merge, or discard this patch.
app/models/VisitorModel.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -521,7 +521,8 @@
 block discarded – undo
521 521
 	 * @param  array  $queryId
522 522
 	 * @return string
523 523
 	 */
524
-	public function getSerializedMailAddress(array $queryId = []) {
524
+	public function getSerializedMailAddress(array $queryId = [])
525
+	{
525 526
 		$recipientMailAddresses = '';
526 527
 
527 528
 		$emails = $this->getDatabase()
Please login to merge, or discard this patch.
app/models/MeetingModel.php 1 patch
Braces   +11 added lines, -9 removed lines patch added patch discarded remove patch
@@ -194,8 +194,9 @@  discard block
 block discarded – undo
194 194
 		foreach($result as $data){
195 195
 			if($data['id'] == $selected_province){
196 196
 				$sel = "selected";
197
+			} else {
198
+				$sel = "";
197 199
 			}
198
-			else $sel = "";
199 200
 			$html_select .= "<option value='".$data['id']."' ".$sel.">".$data['province_name']."</option>";
200 201
 		}
201 202
 
@@ -205,7 +206,8 @@  discard block
 block discarded – undo
205 206
 	}
206 207
 
207 208
 	/** Public program same as getPrograms*/
208
-	public function getPublicPrograms($block_id){
209
+	public function getPublicPrograms($block_id)
210
+	{
209 211
 		$result = $this->getDatabase()
210 212
 			->query('SELECT progs.id AS id,
211 213
 						progs.name AS name,
@@ -217,8 +219,9 @@  discard block
 block discarded – undo
217 219
 				$block_id, '0')
218 220
 			->fetchAll();
219 221
 
220
-		if(!$result) $html = "";
221
-		else {
222
+		if(!$result) {
223
+			$html = "";
224
+		} else {
222 225
 			$html = "<table>\n";
223 226
 			$html .= " <tr>\n";
224 227
 			foreach($result as $data){
@@ -261,8 +264,7 @@  discard block
 block discarded – undo
261 264
 
262 265
 			if(!$result){
263 266
 				$html .= "<td class='emptyTable' style='width:400px;'>Nejsou žádná aktuální data.</td>\n";
264
-			}
265
-			else{
267
+			} else{
266 268
 				foreach($result as $data){
267 269
 					$html .= "<tr>\n";
268 270
 					$html .= "<td class='time'>".$data['from']." - ".$data['to']."</td>\n";
@@ -273,8 +275,7 @@  discard block
 block discarded – undo
273 275
 						$html .= "</div>\n";
274 276
 						$html .= $this->getPublicPrograms($data['id']);
275 277
 						$html .= "</td>\n";
276
-					}
277
-					else {
278
+					} else {
278 279
 						$html .= "<td class='category cat-".$data['style']."'>";
279 280
 						$html .= "<a class='programLink rel='programDetail' href='#' rel='programDetail' title='".$this->program->getDetail($data['id'], 'block', $this->httpEncoding)."'>".$data['name']."</a>\n";
280 281
 						$html .= "</td>\n";
@@ -468,7 +469,8 @@  discard block
 block discarded – undo
468 469
 	 * @param  integer $id
469 470
 	 * @return string
470 471
 	 */
471
-	public function getProvinceNameById($id) {
472
+	public function getProvinceNameById($id)
473
+	{
472 474
 		return $this->getDatabase()
473 475
 			->table('kk_provinces')
474 476
 			->select('province_name')
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,8 @@  discard block
 block discarded – undo
7 7
 	 * @param  mixed
8 8
 	 * @return void
9 9
 	 */
10
-	function dd() {
10
+	function dd()
11
+	{
11 12
 		array_map(function ($x){
12 13
 			(\Tracy\Debugger::dump($x));
13 14
 		}, func_get_args());
@@ -22,7 +23,8 @@  discard block
 block discarded – undo
22 23
 	 *
23 24
 	 * @return string
24 25
 	 */
25
-	function appVersion() {
26
+	function appVersion()
27
+	{
26 28
 		$packagePath = realpath(__DIR__ . '/../package.json');
27 29
 		$package = json_decode(file_get_contents($packagePath));
28 30
 
Please login to merge, or discard this patch.