Completed
Push — master ( 8d2de8...1ce70a )
by Litera
17s
created
app/models/BlockModel.php 3 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@
 block discarded – undo
87 87
 
88 88
 		$html_select = "<select style='width: 300px; font-size: 10px' name='block'>\n";
89 89
 
90
-		foreach($result as $data){
90
+		foreach($result as $data) {
91 91
 			if($data['id'] == $blockId) $selected = "selected";
92 92
 			else $selected = "";
93
-			$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";
93
+			$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 94
 		}
95 95
 		$html_select .= "</select>\n";
96 96
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -98,6 +98,7 @@
 block discarded – undo
98 98
 	 * Return blocks that contents programs
99 99
 	 *
100 100
 	 * @param	int		meeting ID
101
+	 * @param integer $meetingId
101 102
 	 * @return	array	result and number of affected rows
102 103
 	 */
103 104
 	public function getProgramBlocks($meetingId)
Please login to merge, or discard this patch.
app/models/ProgramModel.php 5 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -488,7 +488,7 @@
 block discarded – undo
488 488
 			$inner_html = "<tr>\n";
489 489
 			$inner_html .= " <td class=\"label\">Obsazenost programu:</td>\n";
490 490
 			$inner_html .= " <td class=\"text\">".$countData['visitors']."/".$capacity."</td>\n";
491
-		    $inner_html .= "</tr>\n";
491
+			$inner_html .= "</tr>\n";
492 492
 		}
493 493
 		else $inner_html = "";
494 494
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	 *
220 220
 	 * @return	string	html of a table
221 221
 	 */
222
-	public function getData($program_id = NULL)
222
+	public function getData($program_id = null)
223 223
 	{
224 224
 		if(isset($program_id)) {
225 225
 			$data = $this->database
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
 	 * @param	int		$programId	ID of program
342 342
 	 * @return	string	html or null
343 343
 	 */
344
-	public function getProgramVisitors($programId = NULL)
344
+	public function getProgramVisitors($programId = null)
345 345
 	{
346 346
 		if(!isset($programId)) {
347
-			return NULL;
347
+			return null;
348 348
 		} else {
349 349
 			$html = "  <div style='border-bottom:1px solid black;text-align:right;'>účastníci</div>";
350 350
 
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			->limit(10)
66 66
 			->fetchAll();
67 67
 
68
-		if(!$blocks){
68
+		if(!$blocks) {
69 69
 			$html = "";
70 70
 		} else {
71 71
 			/*
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 			$checked_flag = false;
82 82
 			$html_input = "";
83
-			foreach($blocks as $data){
83
+			foreach($blocks as $data) {
84 84
 				// full program capacity with visitors
85 85
 				$fullProgramData = $this->database
86 86
 					->query('SELECT COUNT(visitor) AS visitors FROM `kk_visitor-program` AS visprog
@@ -94,21 +94,21 @@  discard block
 block discarded – undo
94 94
 					->where('program ? AND visitor ?', $data['id'], $vid)
95 95
 					->fetch();
96 96
 
97
-				if($program){
97
+				if($program) {
98 98
 					$checked = "checked='checked'";
99 99
 					$checked_flag = true;
100 100
 				} else {
101 101
 					$checked = "";
102 102
 				}
103 103
 				// if the capacity is full
104
-				if($fullProgramData['visitors'] >= $data['capacity']){
105
-					$html_input .= "<input id='".$data['id'].$blockId."' ".$checked." disabled type='radio' name='blck_".$blockId."' value='".$data['id']."' />\n";
104
+				if($fullProgramData['visitors'] >= $data['capacity']) {
105
+					$html_input .= "<input id='" . $data['id'] . $blockId . "' " . $checked . " disabled type='radio' name='blck_" . $blockId . "' value='" . $data['id'] . "' />\n";
106 106
 					$fullProgramInfo = " (NELZE ZAPSAT - kapacita programu je již naplněna!)";
107 107
 				} else {
108
-					$html_input .= "<input id='".$data['id'].$blockId."' ".$checked." type='radio' name='blck_".$blockId."' value='".$data['id']."' /> \n";
108
+					$html_input .= "<input id='" . $data['id'] . $blockId . "' " . $checked . " type='radio' name='blck_" . $blockId . "' value='" . $data['id'] . "' /> \n";
109 109
 					$fullProgramInfo = "";
110 110
 				}
111
-				$html_input .= '<label for="'.$data['id'].$blockId.'">'.$data['name'].'</label>';
111
+				$html_input .= '<label for="' . $data['id'] . $blockId . '">' . $data['name'] . '</label>';
112 112
 				$html_input .= $fullProgramInfo;
113 113
 				$html_input .= "<br />\n";
114 114
 			}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			if(!$checked_flag) $checked = "checked='checked'";
118 118
 			else $checked = "";
119 119
 
120
-			$html .= "<input ".$checked." type='radio' name='blck_".$blockId."' value='0' /> Nebudu přítomen <br />\n";
120
+			$html .= "<input " . $checked . " type='radio' name='blck_" . $blockId . "' value='0' /> Nebudu přítomen <br />\n";
121 121
 			$html .= $html_input;
122 122
 
123 123
 			$html .= "</div>\n";
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			$html = "";
139 139
 		} else {
140 140
 			$html = "<table>\n";
141
-			foreach($exportPrograms as $data){
141
+			foreach($exportPrograms as $data) {
142 142
 				$html .= "<tr>";
143 143
 				//// resim kapacitu programu a jeho naplneni navstevniky
144 144
 				$fullProgramData = $this->database
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
 							AND vis.deleted = ?',
150 150
 							$data['id'], '0')->fetch();
151 151
 
152
-				if($fullProgramData['visitors'] >= $data['capacity']){
152
+				if($fullProgramData['visitors'] >= $data['capacity']) {
153 153
 					//$html .= "<input disabled type='radio' name='".$id."' value='".$data['id']."' />\n";
154
-					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>".$fullProgramData['visitors']."/".$data['capacity']."</span> (kapacita programu je naplněna!)";
154
+					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>" . $fullProgramData['visitors'] . "/" . $data['capacity'] . "</span> (kapacita programu je naplněna!)";
155 155
 				}
156 156
 				else {
157 157
 					//$html .= "<input type='radio' name='".$id."' value='".$data['id']."' /> \n";
158
-					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>".$fullProgramData['visitors']."/".$data['capacity']."</span>";
158
+					$fullProgramInfo = "<span style='font-size:12px; font-weight:bold;'>" . $fullProgramData['visitors'] . "/" . $data['capacity'] . "</span>";
159 159
 				}
160 160
 				$html .= "<td style='min-width:270px;'>";
161
-				$html .= "<a rel='programDetail' href='".PRJ_DIR."program/?id=".$data['id']."&cms=edit&page=export' title='".$data['name']."'>".$data['name']."</a>\n";
161
+				$html .= "<a rel='programDetail' href='" . PRJ_DIR . "program/?id=" . $data['id'] . "&cms=edit&page=export' title='" . $data['name'] . "'>" . $data['name'] . "</a>\n";
162 162
 				$html .= "</td>";
163 163
 				$html .= "<td>";
164 164
 				$html .= $fullProgramInfo;
@@ -188,13 +188,13 @@  discard block
 block discarded – undo
188 188
 			->order('day ASC, from ASC')
189 189
 			->fetchAll();
190 190
 
191
-		if(!$progSql){
191
+		if(!$progSql) {
192 192
 			$programs .= "<div class='emptyTable' style='width:400px;'>Nejsou žádná aktuální data.</div>\n";
193 193
 		} else {
194 194
 			//// prasarnicka kvuli programu raftu - resim obsazenost dohromady u dvou polozek
195 195
 			//$raftCountSql = "SELECT COUNT(visitor) AS raft FROM `kk_visitor-program` WHERE program='56|57'";
196 196
 
197
-			foreach($progSql as $progData){
197
+			foreach($progSql as $progData) {
198 198
 				//nemoznost volit predsnemovni dikusi
199 199
 				if($progData['id'] == 63) $notDisplayed = "style='display:none;'";
200 200
 				//obsazenost raftu
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
 				}
206 206
 				*/
207 207
 				else $notDisplayed = "";
208
-				$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>";
208
+				$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>";
210 210
 				$programs .= "<br />";
211 211
 			}
212 212
 		}
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	 * @param	string	disabled
293 293
 	 * @return	string	html
294 294
 	 */
295
-	public function getProgramsRegistration ($id, $disabled)
295
+	public function getProgramsRegistration($id, $disabled)
296 296
 	{
297 297
 		$result = $this->database
298 298
 			->table($this->getTable())
@@ -300,13 +300,13 @@  discard block
 block discarded – undo
300 300
 			->limit(10)
301 301
 			->fetchAll();
302 302
 
303
-		if(!$result){
303
+		if(!$result) {
304 304
 			$html = "";
305 305
 		}
306
-		else{
306
+		else {
307 307
 			$html = "<div>\n";
308
-			$html .= "<input ".$disabled." checked type='radio' name='".$id."' value='0' /> Nebudu přítomen <br />\n";
309
-			foreach($result as $data){
308
+			$html .= "<input " . $disabled . " checked type='radio' name='" . $id . "' value='0' /> Nebudu přítomen <br />\n";
309
+			foreach($result as $data) {
310 310
 				//// resim kapacitu programu a jeho naplneni navstevniky
311 311
 				$fullProgramData = $this->database
312 312
 					->query('SELECT COUNT(visitor) AS visitors FROM `kk_visitor-program` AS visprog
@@ -318,15 +318,15 @@  discard block
 block discarded – undo
318 318
 				if($data['display_in_reg'] == 0) $notDisplayedProg = "style='display:none;'";
319 319
 				else $notDisplayedProg = "";
320 320
 
321
-				if($fullProgramData['visitors'] >= $data['capacity']){
322
-					$html .= "<div ".$notDisplayedProg."><input disabled type='radio' name='".$id."' value='".$data['id']."' />\n";
321
+				if($fullProgramData['visitors'] >= $data['capacity']) {
322
+					$html .= "<div " . $notDisplayedProg . "><input disabled type='radio' name='" . $id . "' value='" . $data['id'] . "' />\n";
323 323
 					$fullProgramInfo = " (NELZE ZAPSAT - kapacita programu je již naplněna!)";
324 324
 				}
325 325
 				else {
326
-					$html .= "<div ".$notDisplayedProg."><input ".$disabled." type='radio' name='".$id."' value='".$data['id']."' /> \n";
326
+					$html .= "<div " . $notDisplayedProg . "><input " . $disabled . " type='radio' name='" . $id . "' value='" . $data['id'] . "' /> \n";
327 327
 					$fullProgramInfo = "";
328 328
 				}
329
-				$html .= "<a class='programLink' rel='programDetail' href='".HTTP_DIR."srazvs/detail.php?id=".$data['id']."&type=program' title='".file_get_contents(HTTP_DIR.'srazvs/detail.php?id='.$data['id'].'&type=program')."' target='_blank'>".$data['name']."</a>\n";
329
+				$html .= "<a class='programLink' rel='programDetail' href='" . HTTP_DIR . "srazvs/detail.php?id=" . $data['id'] . "&type=program' title='" . file_get_contents(HTTP_DIR . 'srazvs/detail.php?id=' . $data['id'] . '&type=program') . "' target='_blank'>" . $data['name'] . "</a>\n";
330 330
 				$html .= $fullProgramInfo;
331 331
 				$html .= "</div>\n";
332 332
 			}
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
 		} else {
349 349
 			$html = "  <div style='border-bottom:1px solid black;text-align:right;'>účastníci</div>";
350 350
 
351
-			$html .= "<br /><a style='text-decoration:none; display:block; margin-bottom:4px;' href='?cms=export-visitors&id=".$programId."'>
352
-	      	<img style='border:none;' align='absbottom' src='".IMG_DIR."icons/pdf.png' />Účastníci programu</a>";
351
+			$html .= "<br /><a style='text-decoration:none; display:block; margin-bottom:4px;' href='?cms=export-visitors&id=" . $programId . "'>
352
+	      	<img style='border:none;' align='absbottom' src='".IMG_DIR . "icons/pdf.png' />Účastníci programu</a>";
353 353
 
354 354
 			$result = $this->database
355 355
 				->query('SELECT vis.name AS name,
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
 						WHERE visprog.program = ? AND vis.deleted = ?',
361 361
 						$programId, '0')->fetchAll();
362 362
 			$i = 1;
363
-			foreach($result as $data){
364
-				$html .= $i.". ".$data['name']." ".$data['surname']." - ".$data['nick']."<br />";
363
+			foreach($result as $data) {
364
+				$html .= $i . ". " . $data['name'] . " " . $data['surname'] . " - " . $data['nick'] . "<br />";
365 365
 				$i++;
366 366
 			}
367 367
 
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 					ORDER BY `day`, `from` ASC',
386 386
 					$visitorId)->fetchAll();
387 387
 
388
-		foreach($result as $progData){
389
-			$programs .= $progData['day'].", ".$progData['from']." - ".$progData['to']."";
390
-			$programs .= "<div style='padding:5px 0px 5px 20px;'>- ".$progData['prog_name']."</div>";
388
+		foreach($result as $progData) {
389
+			$programs .= $progData['day'] . ", " . $progData['from'] . " - " . $progData['to'] . "";
390
+			$programs .= "<div style='padding:5px 0px 5px 20px;'>- " . $progData['prog_name'] . "</div>";
391 391
 		}
392 392
 
393 393
 		return $programs;
@@ -414,20 +414,20 @@  discard block
 block discarded – undo
414 414
 			->fetchAll();
415 415
 	}
416 416
 
417
-	public static function getPdfPrograms($id, $vid, $database){
417
+	public static function getPdfPrograms($id, $vid, $database) {
418 418
 		$result = $database
419 419
 			->table('kk_programs')
420 420
 			->where('block ? AND deleted ?', $id, '0')
421 421
 			->limit(10)
422 422
 			->fetchAll();
423 423
 
424
-		if(!$result){
424
+		if(!$result) {
425 425
 			$html = "";
426 426
 		} else {
427 427
 
428 428
 			$html = "<div class='program'>\n";
429 429
 
430
-			foreach($result as $data){
430
+			foreach($result as $data) {
431 431
 				$rows = $database
432 432
 					->table('kk_visitor-program')
433 433
 					->where('program ? AND visitor ?', $data->id, $vid)
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 		return $html;
441 441
 	}
442 442
 
443
-	public function getProgramsLarge($id){
443
+	public function getProgramsLarge($id) {
444 444
 		$result = $this->database
445 445
 			->query('SELECT progs.name AS name,
446 446
 						cat.style AS style
@@ -454,8 +454,8 @@  discard block
 block discarded – undo
454 454
 		else {
455 455
 			$html = "<table>";
456 456
 			$html .= " <tr>";
457
-			foreach($result as $data){
458
-				$html .= "<td class='category cat-".$data['style']."' >".$data['name']."</td>\n";
457
+			foreach($result as $data) {
458
+				$html .= "<td class='category cat-" . $data['style'] . "' >" . $data['name'] . "</td>\n";
459 459
 			}
460 460
 			$html .= " </tr>\n";
461 461
 			$html .= "</table>\n";
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
 
477 477
 		if(!$result) $html = "";
478 478
 		else {
479
-			foreach($result as $data){
480
-				$html .= $data['name'].",\n";
479
+			foreach($result as $data) {
480
+				$html .= $data['name'] . ",\n";
481 481
 			}
482 482
 		}
483 483
 		return $html;
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 		$tutor = $data['tutor'];
497 497
 		$email = $data['email'];
498 498
 
499
-		if($type == "program"){
499
+		if($type == "program") {
500 500
 			$capacity = $data['capacity'];
501 501
 
502 502
 			$countData = $this->database
@@ -508,12 +508,12 @@  discard block
 block discarded – undo
508 508
 
509 509
 			$inner_html = "<tr>\n";
510 510
 			$inner_html .= " <td class=\"label\">Obsazenost programu:</td>\n";
511
-			$inner_html .= " <td class=\"text\">".$countData['visitors']."/".$capacity."</td>\n";
511
+			$inner_html .= " <td class=\"text\">" . $countData['visitors'] . "/" . $capacity . "</td>\n";
512 512
 		    $inner_html .= "</tr>\n";
513 513
 		}
514 514
 		else $inner_html = "";
515 515
 
516
-		$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>';
516
+		$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>';
517 517
 
518 518
 		return $html;
519 519
 	}
Please login to merge, or discard this 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
@@ -414,7 +424,8 @@  discard block
 block discarded – undo
414 424
 			->fetchAll();
415 425
 	}
416 426
 
417
-	public static function getPdfPrograms($id, $vid, $database){
427
+	public static function getPdfPrograms($id, $vid, $database)
428
+	{
418 429
 		$result = $database
419 430
 			->table('kk_programs')
420 431
 			->where('block ? AND deleted ?', $id, '0')
@@ -432,7 +443,9 @@  discard block
 block discarded – undo
432 443
 					->table('kk_visitor-program')
433 444
 					->where('program ? AND visitor ?', $data->id, $vid)
434 445
 					->fetchAll();
435
-				if($rows) $html .= $data['name'];
446
+				if($rows) {
447
+					$html .= $data['name'];
448
+				}
436 449
 			}
437 450
 			$html .= "</div>\n";
438 451
 		}
@@ -440,7 +453,8 @@  discard block
 block discarded – undo
440 453
 		return $html;
441 454
 	}
442 455
 
443
-	public function getProgramsLarge($id){
456
+	public function getProgramsLarge($id)
457
+	{
444 458
 		$result = $this->database
445 459
 			->query('SELECT progs.name AS name,
446 460
 						cat.style AS style
@@ -450,8 +464,9 @@  discard block
 block discarded – undo
450 464
 				LIMIT 10',
451 465
 				$id, '0')->fetchAll();
452 466
 
453
-		if(!$result) $html = "";
454
-		else {
467
+		if(!$result) {
468
+			$html = "";
469
+		} else {
455 470
 			$html = "<table>";
456 471
 			$html .= " <tr>";
457 472
 			foreach($result as $data){
@@ -474,8 +489,9 @@  discard block
 block discarded – undo
474 489
 
475 490
 		$html = '';
476 491
 
477
-		if(!$result) $html = "";
478
-		else {
492
+		if(!$result) {
493
+			$html = "";
494
+		} else {
479 495
 			foreach($result as $data){
480 496
 				$html .= $data['name'].",\n";
481 497
 			}
@@ -510,8 +526,9 @@  discard block
 block discarded – undo
510 526
 			$inner_html .= " <td class=\"label\">Obsazenost programu:</td>\n";
511 527
 			$inner_html .= " <td class=\"text\">".$countData['visitors']."/".$capacity."</td>\n";
512 528
 		    $inner_html .= "</tr>\n";
529
+		} else {
530
+			$inner_html = "";
513 531
 		}
514
-		else $inner_html = "";
515 532
 
516 533
 		$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>';
517 534
 
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 	/**
54 54
 	 * Get programs
55 55
 	 *
56
-	 * @param	int		$block_id	ID of block
57
-	 * @param	int		$visitor_id	ID of visitor
56
+	 * @param	int		$blockId	ID of block
58 57
 	 * @return	string				html
59 58
 	 */
60 59
 	public function getPrograms($blockId, $vid)
@@ -250,7 +249,7 @@  discard block
 block discarded – undo
250 249
 	}
251 250
 
252 251
 	/**
253
-	 * @return Nette\Database\Table\ActiveRow
252
+	 * @return \Nette\Database\IRow[]
254 253
 	 */
255 254
 	public function all()
256 255
 	{
@@ -414,6 +413,9 @@  discard block
 block discarded – undo
414 413
 			->fetchAll();
415 414
 	}
416 415
 
416
+	/**
417
+	 * @param Context $database
418
+	 */
417 419
 	public static function getPdfPrograms($id, $vid, $database){
418 420
 		$result = $database
419 421
 			->table('kk_programs')
@@ -483,6 +485,9 @@  discard block
 block discarded – undo
483 485
 		return $html;
484 486
 	}
485 487
 
488
+	/**
489
+	 * @param string $type
490
+	 */
486 491
 	public function getDetail($id, $type, $httpEncoding)
487 492
 	{
488 493
 		$data = $this->database
@@ -536,7 +541,7 @@  discard block
 block discarded – undo
536 541
 
537 542
 	/**
538 543
 	 * @param  integer $blockId
539
-	 * @return Row
544
+	 * @return \Nette\Database\IRow[]
540 545
 	 */
541 546
 	public function findByBlockId($blockId = null)
542 547
 	{
@@ -567,7 +572,7 @@  discard block
 block discarded – undo
567 572
 
568 573
 	/**
569 574
 	 * @param  int  $programId
570
-	 * @return Row
575
+	 * @return \Nette\Database\IRow[]
571 576
 	 */
572 577
 	public function findProgramVisitors(int $programId)
573 578
 	{
Please login to merge, or discard this patch.
app/helpers.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 	 * @return void
9 9
 	 */
10 10
 	function dd() {
11
-		array_map(function ($x){
11
+		array_map(function($x) {
12 12
 			(\Tracy\Debugger::dump($x));
13 13
 		}, func_get_args());
14 14
 
Please login to merge, or discard this patch.
app/presenters/ProgramPresenter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 			Debugger::log('Destroying of program successfull, result: ' . json_encode($result), Debugger::INFO);
140 140
 			$this->flashMessage('Položka byla úspěšně smazána.', 'ok');
141 141
 		} catch(Exception $e) {
142
-			Debugger::log('Destroying of program failed, result: ' .  $e->getMessage(), Debugger::ERROR);
142
+			Debugger::log('Destroying of program failed, result: ' . $e->getMessage(), Debugger::ERROR);
143 143
 			$this->flashMessage('Smazání programu se nezdařilo, result: ' . $e->getMessage(), 'error');
144 144
 		}
145 145
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 			Debugger::log('Sending email to program tutor successfull, result: ' . json_encode($recipients) . ', ' . $tutors->guid, Debugger::INFO);
183 183
 			$this->flashMessage('Email lektorovi byl odeslán..', 'ok');
184 184
 		} catch(Exception $e) {
185
-			Debugger::log('Sending email to program tutor failed, result: ' .  $e->getMessage(), Debugger::ERROR);
185
+			Debugger::log('Sending email to program tutor failed, result: ' . $e->getMessage(), Debugger::ERROR);
186 186
 			$this->flashMessage('Email lektorovi nebyl odeslán, result: ' . $e->getMessage(), 'error');
187 187
 		}
188 188
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		$template->error_material = '';
244 244
 		$template->display_in_reg_checkbox = $this->renderHtmlCheckBox('display_in_reg', 0, 1);
245 245
 		$template->block_select = $this->getBlockModel()->renderHtmlSelect(null);
246
-		$template->selectedCategory	= null;
246
+		$template->selectedCategory = null;
247 247
 	}
248 248
 
249 249
 	/**
Please login to merge, or discard this patch.
app/presenters/SettingsPresenter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
 			Debugger::log('Settings: mail type ' . $id . ' succesfully send to recipient ' . $recipient, Debugger::INFO);
68 68
 			$this->flashMessage('Settings: mail type ' . $id . ' succesfully send.', 'ok');
69
-		} catch (Exception $e) {
69
+		} catch(Exception $e) {
70 70
 			Debugger::log('Settings: mail type ' . $id . ' send to recipient ' . $recipient . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
71 71
 			$this->flashMessage('Settings: mail type ' . $id . ' send to recipient failed, result: ' . $e->getMessage(), 'error');
72 72
 		}
Please login to merge, or discard this patch.
app/presenters/MeetingPresenter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,10 +71,10 @@
 block discarded – undo
71 71
 	{
72 72
 		try {
73 73
 			$result = $this->getModel()->delete($id);
74
-			Debugger::log('Destroying of meeting('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
74
+			Debugger::log('Destroying of meeting(' . $id . ') successfull, result: ' . json_encode($result), Debugger::INFO);
75 75
 			$this->flashMessage('Položka byla úspěšně smazána', 'ok');
76 76
 		} catch(Exception $e) {
77
-			Debugger::log('Destroying of meeting('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
77
+			Debugger::log('Destroying of meeting(' . $id . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
78 78
 			$this->flashMessage('Destroying of meeting failed, result: ' . $e->getMessage(), 'error');
79 79
 		}
80 80
 
Please login to merge, or discard this patch.
app/models/MeetingModel.php 4 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			$html = "<table>\n";
224 224
 			$html .= " <tr>\n";
225 225
 			foreach($result as $data) {
226
-				$html .= "<td class='category cat-".$data['style']."' style='text-align:center;'>\n";
226
+				$html .= "<td class='category cat-" . $data['style'] . "' style='text-align:center;'>\n";
227 227
 				$html .= "<a class='programLink' rel='programDetail' href='#' rel='programDetail' title='" . $this->program->getDetail($data['id'], 'program', $this->httpEncoding) . "'>" . $data['name'] . "</a>\n";
228 228
 				$html .= "</td>\n";
229 229
 			}
@@ -322,17 +322,17 @@  discard block
 block discarded – undo
322 322
 		} else {
323 323
 			foreach($result as $data) {
324 324
 				$html_row .= "<tr class='radek1'>";
325
-				$html_row .= "\t\t\t<td><a href='process.php?id=".$data['id']."&cms=edit&page=meetings' title='Upravit'><img class='edit' src='".IMG_DIR."icons/edit.gif' /></a></td>\n";
326
-				$html_row .= "\t\t\t<td><a href=\"javascript:confirmation('?id=".$data['id']."&amp;cms=del', 'sraz: ".$data['place']." ".$data['start_date']." -> Opravdu SMAZAT tento sraz? Jste si jisti?')\" title='Odstranit'><img class='edit' src='".IMG_DIR."icons/delete.gif' /></a></td>\n";
327
-				$html_row .= "\t\t\t<td class='text'>".$data['id']."</td>\n";
328
-				$html_row .= "\t\t\t<td class='text'>".$data['place']."</td>\n";
329
-				$html_row .= "\t\t\t<td class='text'>".$data['start_date']."</td>\n";
330
-				$html_row .= "\t\t\t<td class='text'>".$data['end_date']."</td>\n";
331
-				$html_row .= "\t\t\t<td class='text'>".$data['open_reg']."</td>\n";
332
-				$html_row .= "\t\t\t<td class='text'>".$data['close_reg']."</td>\n";
333
-				$html_row .= "\t\t\t<td class='text'>".$data['contact']."</td>\n";
334
-				$html_row .= "\t\t\t<td class='text'>".$data['email']."</td>\n";
335
-				$html_row .= "\t\t\t<td class='text'>".$data['gsm']."</td>\n";
325
+				$html_row .= "\t\t\t<td><a href='process.php?id=" . $data['id'] . "&cms=edit&page=meetings' title='Upravit'><img class='edit' src='" . IMG_DIR . "icons/edit.gif' /></a></td>\n";
326
+				$html_row .= "\t\t\t<td><a href=\"javascript:confirmation('?id=" . $data['id'] . "&amp;cms=del', 'sraz: " . $data['place'] . " " . $data['start_date'] . " -> Opravdu SMAZAT tento sraz? Jste si jisti?')\" title='Odstranit'><img class='edit' src='" . IMG_DIR . "icons/delete.gif' /></a></td>\n";
327
+				$html_row .= "\t\t\t<td class='text'>" . $data['id'] . "</td>\n";
328
+				$html_row .= "\t\t\t<td class='text'>" . $data['place'] . "</td>\n";
329
+				$html_row .= "\t\t\t<td class='text'>" . $data['start_date'] . "</td>\n";
330
+				$html_row .= "\t\t\t<td class='text'>" . $data['end_date'] . "</td>\n";
331
+				$html_row .= "\t\t\t<td class='text'>" . $data['open_reg'] . "</td>\n";
332
+				$html_row .= "\t\t\t<td class='text'>" . $data['close_reg'] . "</td>\n";
333
+				$html_row .= "\t\t\t<td class='text'>" . $data['contact'] . "</td>\n";
334
+				$html_row .= "\t\t\t<td class='text'>" . $data['email'] . "</td>\n";
335
+				$html_row .= "\t\t\t<td class='text'>" . $data['gsm'] . "</td>\n";
336 336
 				$html_row .= "</tr>";
337 337
 			}
338 338
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,8 +193,9 @@
 block discarded – undo
193 193
 		foreach($result as $data) {
194 194
 			if($data['id'] == $selectedProvince) {
195 195
 				$sel = "selected";
196
+			} else {
197
+				$sel = "";
196 198
 			}
197
-			else $sel = "";
198 199
 			$html_select .= "<option value='" . $data['id'] . "' " . $sel . ">" . $data['province_name'] . "</option>";
199 200
 		}
200 201
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
 	public $dbColumns = array();
28 28
 
29 29
 	/** @var datetime at what registration opens */
30
-	public $regOpening = NULL;
30
+	public $regOpening = null;
31 31
 
32 32
 	/** @var datetime at what registration ends*/
33
-	public $regClosing = NULL;
33
+	public $regClosing = null;
34 34
 
35 35
 	/** @var string registration heading text */
36 36
 	public $regHeading = '';
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * Create a new record
99 99
 	 *
100 100
 	 * @param	mixed	array of data
101
-	 * @return	boolean
101
+	 * @return	\Nette\Database\ResultSet
102 102
 	 */
103 103
 	public function create(array $data)
104 104
 	{
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	 * Modify record
113 113
 	 *
114 114
 	 * @param	int		$id			ID of record
115
-	 * @param	array	$db_data	array of data
116
-	 * @return	bool
115
+	 * @param	array	$data	array of data
116
+	 * @return	integer|null
117 117
 	 */
118 118
 	public function update($id, array $data)
119 119
 	{
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * Delete one or multiple record/s
127 127
 	 *
128 128
 	 * @param	int		ID/s of record
129
-	 * @return	boolean
129
+	 * @return	integer|null
130 130
 	 */
131 131
 	public function delete($ids)
132 132
 	{
@@ -233,6 +233,9 @@  discard block
 block discarded – undo
233 233
 		return $html;
234 234
 	}
235 235
 
236
+	/**
237
+	 * @param integer $meetingId
238
+	 */
236 239
 	public function renderPublicProgramOverview($meetingId)
237 240
 	{
238 241
 		$days = array("pátek", "sobota", "neděle");
@@ -493,7 +496,7 @@  discard block
 block discarded – undo
493 496
 	}
494 497
 
495 498
 	/**
496
-	 * @return ActiveRow
499
+	 * @return \Nette\Database\IRow[]
497 500
 	 */
498 501
 	public function getMenuItems()
499 502
 	{
Please login to merge, or discard this patch.
app/models/VisitorModel.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		// visitor's id is empty and i must add one
154 154
 		$meals_data['visitor'] = $ID_visitor;
155 155
 
156
-		if($ID_visitor){
156
+		if($ID_visitor) {
157 157
 			// gets data from database
158 158
 			$program_blocks = $this->Blocks->getProgramBlocks($DB_data['meeting']);
159 159
 
@@ -451,14 +451,14 @@  discard block
 block discarded – undo
451 451
 		$programBlocks = $this->Blocks->getProgramBlocks($meetingId);
452 452
 
453 453
 		// table is empty
454
-		if(!$programBlocks){
454
+		if(!$programBlocks) {
455 455
 			$html .= "<div class='emptyTable' style='width:400px;'>Nejsou žádná aktuální data.</div>\n";
456 456
 		} else {
457 457
 			foreach($programBlocks as $block) {
458
-				$html .= "<div class='block-" . $block->id .  " ".Strings::webalize($block['day'])."'>".$block['day'].", ".$block['from']." - ".$block['to']." : ".$block['name']."</div>\n";
458
+				$html .= "<div class='block-" . $block->id . " " . Strings::webalize($block['day']) . "'>" . $block['day'] . ", " . $block['from'] . " - " . $block['to'] . " : " . $block['name'] . "</div>\n";
459 459
 				// rendering programs in block
460 460
 				if($block['program'] == 1) {
461
-					$html .= "<div class='block-" . $block->id .  " programs ".Strings::webalize($block['day'])." ".Strings::webalize($block['name'])."'>".$this->Programs->getPrograms($block['id'], $visitorId)."</div>";
461
+					$html .= "<div class='block-" . $block->id . " programs " . Strings::webalize($block['day']) . " " . Strings::webalize($block['name']) . "'>" . $this->Programs->getPrograms($block['id'], $visitorId) . "</div>";
462 462
 				}
463 463
 				$html .= "<br />";
464 464
 			}
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 			->group('email')
532 532
 			->fetchAll();
533 533
 
534
-		foreach($emails as $item){
534
+		foreach($emails as $item) {
535 535
 			$recipientMailAddresses .= $item['email'] . ",\n";
536 536
 		}
537 537
 
Please login to merge, or discard this patch.
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 	/**
194 194
 	 * Modify a visitor
195 195
 	 *
196
-	 * @param	int		$visitor_id		ID of a visitor
197
-	 * @param	array	$db_data		Visitor's database data
196
+	 * @param	int		$ID_visitor		ID of a visitor
197
+	 * @param	array	$DB_data		Visitor's database data
198 198
 	 * @param	array	$meals_data		Data of meals
199 199
 	 * @param	array	$programs_data	Program's data
200 200
 	 * @return	mixed					TRUE or array of errors
@@ -239,8 +239,7 @@  discard block
 block discarded – undo
239 239
 	/**
240 240
 	 * Modify a visitor
241 241
 	 *
242
-	 * @param	int		$visitor_id		ID of a visitor
243
-	 * @param	array	$db_data		Visitor's database data
242
+	 * @param	array	$DB_data		Visitor's database data
244 243
 	 * @param	array	$meals_data		Data of meals
245 244
 	 * @param	array	$programs_data	Program's data
246 245
 	 * @return	mixed					TRUE or array of errors
@@ -288,7 +287,8 @@  discard block
 block discarded – undo
288 287
 	 * Delete one or multiple record/s
289 288
 	 *
290 289
 	 * @param	int		ID/s of record
291
-	 * @return	boolean
290
+	 * @param integer $id
291
+	 * @return	integer|null
292 292
 	 */
293 293
 	public function delete($id)
294 294
 	{
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	 *
306 306
 	 * @param	int		ID/s of record
307 307
 	 * @param 	int 	0 | 1
308
-	 * @return	boolean
308
+	 * @return	integer|null
309 309
 	 */
310 310
 	public function checked($id, $value)
311 311
 	{
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 	 *
376 376
 	 * @param	int	ID/s of visitor
377 377
 	 * @param	string	type of payment (pay | advance)
378
-	 * @return	string	error message or true
378
+	 * @return	integer|null	error message or true
379 379
 	 */
380 380
 	public function payCharge($query_id, $type)
381 381
 	{
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	 * Get recipients by ids
399 399
 	 *
400 400
 	 * @param	mixed	ID of visitor
401
-	 * @return	mixed	result
401
+	 * @return	\Nette\Database\IRow[]	result
402 402
 	 */
403 403
 	public function getRecipients($ids)
404 404
 	{
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	 * Get visitor's programs
415 415
 	 *
416 416
 	 * @param	int		ID of visitor
417
-	 * @return	mixed	result
417
+	 * @return	\Nette\Database\IRow[]	result
418 418
 	 */
419 419
 	public function getVisitorPrograms($visitorId)
420 420
 	{
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 	}
458 458
 
459 459
 	/**
460
-	 * @return Row
460
+	 * @return \Nette\Database\IRow[]
461 461
 	 */
462 462
 	public function all()
463 463
 	{
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 
545 545
 	/**
546 546
 	 * @param	int		ID of visitor
547
-	 * @return	mixed	result
547
+	 * @return	\Nette\Database\IRow[]	result
548 548
 	 */
549 549
 	public function findVisitorPrograms(int $visitorId)
550 550
 	{
Please login to merge, or discard this patch.
app/bootstrap.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 require_once __DIR__ . '/../vendor/autoload.php';
13 13
 
14
-define('SESSION_PREFIX', md5('localhost'.'vodni'.'vodni'.'sunlight')."-");
14
+define('SESSION_PREFIX', md5('localhost' . 'vodni' . 'vodni' . 'sunlight') . "-");
15 15
 
16 16
 //nastartovani session
17 17
 session_name(SESSION_PREFIX . 'session');
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	->addDirectory(__DIR__ . '/../inc')
40 40
 	->register();
41 41
 
42
-if ($configurator->isDebugMode()) {
42
+if($configurator->isDebugMode()) {
43 43
     $configurator->addConfig(__DIR__ . '/config/config.development.neon');
44 44
 } else {
45 45
     $configurator->addConfig(__DIR__ . '/config/config.production.neon');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 $parameters = $container->getParameters();
57 57
 
58 58
 define('ROOT_DIR', $parameters['wwwDir']);
59
-define('HTTP_DIR', '//'.$_SERVER['HTTP_HOST'] . '/');
59
+define('HTTP_DIR', '//' . $_SERVER['HTTP_HOST'] . '/');
60 60
 
61 61
 /**
62 62
  * Application's definitions
@@ -65,24 +65,24 @@  discard block
 block discarded – undo
65 65
  */
66 66
 
67 67
 /* System Directories */
68
-define('PRJ_DIR',		HTTP_DIR . 'srazvs/');
69
-define('INC_DIR',		ROOT_DIR . '/inc/');
70
-define('IMG_DIR',		PRJ_DIR . 'www/images/');
71
-define('CSS_DIR',		PRJ_DIR . 'www/css/');
72
-define('JS_DIR',		PRJ_DIR . 'www/js/');
68
+define('PRJ_DIR', HTTP_DIR . 'srazvs/');
69
+define('INC_DIR', ROOT_DIR . '/inc/');
70
+define('IMG_DIR', PRJ_DIR . 'www/images/');
71
+define('CSS_DIR', PRJ_DIR . 'www/css/');
72
+define('JS_DIR', PRJ_DIR . 'www/js/');
73 73
 
74 74
 /* Application */
75
-define('TEMPLATE_DIR',	$parameters['appDir'] . '/templates/');
76
-define('TPL_DIR',		TEMPLATE_DIR);
75
+define('TEMPLATE_DIR', $parameters['appDir'] . '/templates/');
76
+define('TPL_DIR', TEMPLATE_DIR);
77 77
 
78 78
 /* URLs */
79
-define('BLOCK_DIR',		PRJ_DIR.'block');
80
-define('PROG_DIR',		PRJ_DIR.'program');
81
-define('MEET_DIR',		PRJ_DIR.'meeting');
82
-define('VISIT_DIR',		PRJ_DIR.'visitor');
83
-define('CAT_DIR',		PRJ_DIR.'category');
84
-define('EXP_DIR',		PRJ_DIR.'export');
85
-define('SET_DIR',		PRJ_DIR.'settings');
79
+define('BLOCK_DIR', PRJ_DIR . 'block');
80
+define('PROG_DIR', PRJ_DIR . 'program');
81
+define('MEET_DIR', PRJ_DIR . 'meeting');
82
+define('VISIT_DIR', PRJ_DIR . 'visitor');
83
+define('CAT_DIR', PRJ_DIR . 'category');
84
+define('EXP_DIR', PRJ_DIR . 'export');
85
+define('SET_DIR', PRJ_DIR . 'settings');
86 86
 
87 87
 /**
88 88
  * Connecting to Database
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
  */
133 133
 if(file_exists($target)) {
134 134
 	// access control
135
-	if(array_search($controllerName.'.'.$action, $publicPages) === false) {
135
+	if(array_search($controllerName . '.' . $action, $publicPages) === false) {
136 136
 		include_once(INC_DIR . 'access.inc.php');
137 137
 	}
138 138
 }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 	->register();
41 41
 
42 42
 if ($configurator->isDebugMode()) {
43
-    $configurator->addConfig(__DIR__ . '/config/config.development.neon');
43
+	$configurator->addConfig(__DIR__ . '/config/config.development.neon');
44 44
 } else {
45
-    $configurator->addConfig(__DIR__ . '/config/config.production.neon');
45
+	$configurator->addConfig(__DIR__ . '/config/config.production.neon');
46 46
 }
47 47
 $configurator->addConfig(__DIR__ . '/config/config.local.neon');
48 48
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 RadekDostal\NetteComponents\DateTimePicker\TbDatePicker::register();
53 53
 
54 54
 $configurator->addServices(array(
55
-    'session.session' => $session,
55
+	'session.session' => $session,
56 56
 ));
57 57
 $container = $configurator->createContainer();
58 58
 $parameters = $container->getParameters();
Please login to merge, or discard this patch.