Passed
Push — devel ( 210a55...99da33 )
by Litera
07:36 queued 06:36
created
app/models/ProgramModel.php 1 patch
Braces   +28 added lines, -14 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
 		}
@@ -307,7 +315,8 @@  discard block
 block discarded – undo
307 315
 			->fetchAll();
308 316
 	}
309 317
 
310
-	public static function getPdfPrograms($id, $vid, $database){
318
+	public static function getPdfPrograms($id, $vid, $database)
319
+	{
311 320
 		$result = $database
312 321
 			->table('kk_programs')
313 322
 			->where('block ? AND deleted ?', $id, '0')
@@ -325,7 +334,9 @@  discard block
 block discarded – undo
325 334
 					->table('kk_visitor-program')
326 335
 					->where('program ? AND visitor ?', $data->id, $vid)
327 336
 					->fetchAll();
328
-				if($rows) $html .= $data['name'];
337
+				if($rows) {
338
+					$html .= $data['name'];
339
+				}
329 340
 			}
330 341
 			$html .= "</div>\n";
331 342
 		}
@@ -333,7 +344,8 @@  discard block
 block discarded – undo
333 344
 		return $html;
334 345
 	}
335 346
 
336
-	public function getProgramsLarge($id){
347
+	public function getProgramsLarge($id)
348
+	{
337 349
 		$result = $this->database
338 350
 			->query('SELECT progs.name AS name,
339 351
 						cat.style AS style
@@ -343,8 +355,9 @@  discard block
 block discarded – undo
343 355
 				LIMIT 10',
344 356
 				$id, '0')->fetchAll();
345 357
 
346
-		if(!$result) $html = "";
347
-		else {
358
+		if(!$result) {
359
+			$html = "";
360
+		} else {
348 361
 			$html = "<table>";
349 362
 			$html .= " <tr>";
350 363
 			foreach($result as $data){
@@ -367,8 +380,9 @@  discard block
 block discarded – undo
367 380
 
368 381
 		$html = '';
369 382
 
370
-		if(!$result) $html = "";
371
-		else {
383
+		if(!$result) {
384
+			$html = "";
385
+		} else {
372 386
 			foreach($result as $data){
373 387
 				$html .= $data['name'].",\n";
374 388
 			}
Please login to merge, or discard this patch.
app/models/MealModel.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      * @return ActiveRow|bool
95 95
      */
96 96
 	public function updateOrCreate(int $visitorId, array $values)
97
-    {
97
+	{
98 98
         $result = $this->updateByVisitor($visitorId, $values);
99 99
 
100 100
         if(!$result) {
Please login to merge, or discard this patch.