Test Failed
Branch devel (807472)
by Litera
06:16
created
tests/acceptance/RegistrationCest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 		$I->seeCurrentUrlMatches($this->succeededRegistrationUrl);
96 96
 		$I->see('úspěšně založena');
97 97
 		$I->see('Registrace na srazy K + K');
98
-		foreach ($this->successVisitor['fields'] as $field => $value) {
98
+		foreach($this->successVisitor['fields'] as $field => $value) {
99 99
 			$I->see($value);
100 100
 		}
101 101
 		$I->see($this->successVisitor['options']['province']);
Please login to merge, or discard this patch.
app/presenters/BasePresenter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	];
49 49
 
50 50
 	protected $hours = [
51
-		0 => "00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"
51
+		0 => "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"
52 52
 	];
53 53
 
54 54
 	protected $minutes = [
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			$this->setBacklink($backlink);
81 81
 		}
82 82
 
83
-		if($meetingId){
83
+		if($meetingId) {
84 84
 			$_SESSION['meetingID'] = $meetingId;
85 85
 		} elseif(!isset($_SESSION['meetingID'])) {
86 86
 			$meeting = $this->getContainer()->getService('meeting');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 		$template->visitDir = VISIT_DIR;
121 121
 		$template->expDir = EXP_DIR;
122 122
 
123
-		$template->categories = $this->remember('categories:all', 10, function () {
123
+		$template->categories = $this->remember('categories:all', 10, function() {
124 124
 			return $this->getContainer()->getService('category')->all();
125 125
 		});
126 126
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 		}
130 130
 		$template->meeting = $meeting->getPlaceAndYear($_SESSION['meetingID']);
131 131
 		$template->menuItems = $meeting->getMenuItems();
132
-		$template->meeting_heading	= $meeting->getRegHeading();
132
+		$template->meeting_heading = $meeting->getRegHeading();
133 133
 		$template->meetingId = $this->getMeetingId();
134 134
 		$template->backlinkUrl = $this->getBacklinkUrl();
135 135
 		$template->backlink = $this->getBacklink();
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		$names = explode(',', $item->tutor);
232 232
 
233 233
 		$i = 0;
234
-		foreach ($mails as $mail) {
234
+		foreach($mails as $mail) {
235 235
 			$mail = trim($mail);
236 236
 			$name = trim($names[$i]);
237 237
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	// zaheshovane udaje, aby se nedali jen tak ziskat data z databaze
245 245
 	protected function formKeyHash($id, $meetingId)
246 246
 	{
247
-		return ((int)$id . $meetingId) * 116 + 39147;
247
+		return ((int) $id.$meetingId) * 116 + 39147;
248 248
 	}
249 249
 
250 250
 	/**
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
 		// If the item exists in the cache we will just return this immediately
411 411
 		// otherwise we will execute the given Closure and cache the result
412 412
 		// of that execution for the given number of minutes in storage.
413
-		if (! is_null($data = $this->getCache()->load($key))) {
413
+		if(!is_null($data = $this->getCache()->load($key))) {
414 414
 			$items = [];
415 415
 
416 416
 			foreach($data as $item) {
417 417
 				$object = new \stdClass();
418
-				foreach ($item as $key => $value) {
418
+				foreach($item as $key => $value) {
419 419
 					$object->$key = $value;
420 420
 				}
421 421
 				$items[] = $object;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
 		$data = $callback();
428 428
 		$serialized = [];
429
-		foreach ($data as $item) {
429
+		foreach($data as $item) {
430 430
 			$serialized[] = $item->toArray();
431 431
 		}
432 432
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 			$key,
435 435
 			$serialized,
436 436
 			[
437
-				Cache::EXPIRE => $minutes . ' minutes',
437
+				Cache::EXPIRE => $minutes.' minutes',
438 438
 			]
439 439
 		);
440 440
 
Please login to merge, or discard this patch.
app/presenters/VisitorPresenter.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 class VisitorPresenter extends BasePresenter
26 26
 {
27 27
 
28
-	const TEMPLATE_DIR = __DIR__ . '/../templates/visitor/';
28
+	const TEMPLATE_DIR = __DIR__.'/../templates/visitor/';
29 29
 	const TEMPLATE_EXT = 'latte';
30 30
 
31 31
 	/**
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 			$guid = $this->getVisitorService()->create($postData);
104 104
 			$result = $this->sendRegistrationSummary($postData, $guid);
105 105
 
106
-			Debugger::log('Creation of visitor('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
107
-			$this->flashMessage('Účastník(' . $guid . ') byl úspěšně upraven.', 'ok');
106
+			Debugger::log('Creation of visitor('.$guid.') successfull, result: '.json_encode($result), Debugger::INFO);
107
+			$this->flashMessage('Účastník('.$guid.') byl úspěšně upraven.', 'ok');
108 108
 		} catch(Exception $e) {
109
-			Debugger::log('Creation of visitor('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
110
-			$this->flashMessage('Creation of visitor failed, result: ' . $e->getMessage(), 'error');
109
+			Debugger::log('Creation of visitor('.$guid.') failed, result: '.$e->getMessage(), Debugger::ERROR);
110
+			$this->flashMessage('Creation of visitor failed, result: '.$e->getMessage(), 'error');
111 111
 		}
112 112
 
113 113
 		$this->redirect('Visitor:listing');
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 
131 131
 			//$result = $this->sendRegistrationSummary($visitor, $guid);
132 132
 
133
-			Debugger::log('Modification of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
134
-			$this->flashMessage('Účastník(' . $id . ') byl úspěšně upraven.', 'ok');
133
+			Debugger::log('Modification of visitor('.$id.') successfull, result: '.json_encode($result), Debugger::INFO);
134
+			$this->flashMessage('Účastník('.$id.') byl úspěšně upraven.', 'ok');
135 135
 		} catch(Exception $e) {
136
-			Debugger::log('Modification of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
137
-			$this->flashMessage('Modification of visitor failed, result: ' . $e->getMessage(), 'error');
136
+			Debugger::log('Modification of visitor('.$id.') failed, result: '.$e->getMessage(), Debugger::ERROR);
137
+			$this->flashMessage('Modification of visitor failed, result: '.$e->getMessage(), 'error');
138 138
 		}
139 139
 
140 140
 		$this->redirect('Visitor:listing');
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 		try {
150 150
 			$result = $this->getVisitorService()->delete($id);
151 151
 
152
-			Debugger::log('Destroying of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
152
+			Debugger::log('Destroying of visitor('.$id.') successfull, result: '.json_encode($result), Debugger::INFO);
153 153
 			$this->flashMessage('Položka byla úspěšně smazána', 'ok');
154 154
 		} catch(Exception $e) {
155
-			Debugger::log('Destroying of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
156
-			$this->flashMessage('Destroying of visitor failed, result: ' . $e->getMessage(), 'error');
155
+			Debugger::log('Destroying of visitor('.$id.') failed, result: '.$e->getMessage(), Debugger::ERROR);
156
+			$this->flashMessage('Destroying of visitor failed, result: '.$e->getMessage(), 'error');
157 157
 		}
158 158
 
159 159
 		$this->redirect('Visitor:listing');
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 
186 186
 			$result = $this->getEmailer()->sendMail($recipient, $subject, (string) $template, $bcc);
187 187
 
188
-			Debugger::log('E-mail was send successfully, result: ' . json_encode($result), Debugger::INFO);
188
+			Debugger::log('E-mail was send successfully, result: '.json_encode($result), Debugger::INFO);
189 189
 			$this->flashMessage('E-mail byl úspěšně odeslán', 'ok');
190 190
 		} catch(Exception $e) {
191
-			Debugger::log('Sending of e-mail failed, result: ' .  $e->getMessage(), Debugger::ERROR);
192
-			$this->flashMessage('Sending of e-mail failed, result: ' . $e->getMessage(), 'error');
191
+			Debugger::log('Sending of e-mail failed, result: '.$e->getMessage(), Debugger::ERROR);
192
+			$this->flashMessage('Sending of e-mail failed, result: '.$e->getMessage(), 'error');
193 193
 		}
194 194
 
195 195
 		$this->redirect('Visitor:listing');
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
 			$recipients = $visitor->getRecipients($id);
208 208
 			$this->getEmailer()->sendPaymentInfo($recipients, 'advance');
209 209
 
210
-			Debugger::log('Visitor: Action pay for id ' . $id . ' successfull, result: ' . $e->getMessage(), Debugger::INFO);
210
+			Debugger::log('Visitor: Action pay for id '.$id.' successfull, result: '.$e->getMessage(), Debugger::INFO);
211 211
 			$this->flashMessage('Platba byla zaplacena.', 'ok');
212 212
 		} catch(Exception $e) {
213
-			Debugger::log('Visitor: Action pay for id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
214
-			$this->flashMessage('Visitor: Action pay for id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
213
+			Debugger::log('Visitor: Action pay for id '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
214
+			$this->flashMessage('Visitor: Action pay for id '.$id.' failed, result: '.$e->getMessage(), 'error');
215 215
 		}
216 216
 
217 217
 		$this->redirect('Visitor:listing');
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 			$recipients = $visitor->getRecipients($id);
230 230
 			$this->getEmailer()->sendPaymentInfo($recipients, 'advance');
231 231
 
232
-			Debugger::log('Visitor: Action advance for id ' . $id . ' successfull, result: ' . $e->getMessage(), Debugger::INFO);
232
+			Debugger::log('Visitor: Action advance for id '.$id.' successfull, result: '.$e->getMessage(), Debugger::INFO);
233 233
 			$this->flashMessage('Záloha byla zaplacena.', 'ok');
234 234
 		} catch(Exception $e) {
235
-			Debugger::log('Visitor: Action advance for id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
236
-			$this->flashMessage('Visitor: Action advance for id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
235
+			Debugger::log('Visitor: Action advance for id '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
236
+			$this->flashMessage('Visitor: Action advance for id '.$id.' failed, result: '.$e->getMessage(), 'error');
237 237
 		}
238 238
 
239 239
 		$this->redirect('Visitor:listing');
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
 	{
250 250
 		try {
251 251
 			$result = $this->getModel()->checked($id, '1');
252
-			Debugger::log('Check of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
252
+			Debugger::log('Check of visitor('.$id.') successfull, result: '.json_encode($result), Debugger::INFO);
253 253
 			$this->flashMessage('Položka byla úspěšně zkontrolována', 'ok');
254 254
 		} catch(Exception $e) {
255
-			Debugger::log('Check of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
256
-			$this->flashMessage('Check of visitor failed, result: ' . $e->getMessage(), 'error');
255
+			Debugger::log('Check of visitor('.$id.') failed, result: '.$e->getMessage(), Debugger::ERROR);
256
+			$this->flashMessage('Check of visitor failed, result: '.$e->getMessage(), 'error');
257 257
 		}
258 258
 
259 259
 		$this->redirect('Visitor:listing');
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 	{
270 270
 		try {
271 271
 			$result = $this->getModel()->checked($id, 0);
272
-			Debugger::log('Uncheck of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
272
+			Debugger::log('Uncheck of visitor('.$id.') successfull, result: '.json_encode($result), Debugger::INFO);
273 273
 			$this->flashMessage('Položka byla nastavena jako nekontrolována', 'ok');
274 274
 		} catch(Exception $e) {
275
-			Debugger::log('Uncheck of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
276
-			$this->flashMessage('Uncheck of visitor failed, result: ' . $e->getMessage(), 'error');
275
+			Debugger::log('Uncheck of visitor('.$id.') failed, result: '.$e->getMessage(), Debugger::ERROR);
276
+			$this->flashMessage('Uncheck of visitor failed, result: '.$e->getMessage(), 'error');
277 277
 		}
278 278
 
279 279
 		$this->redirect('Visitor:listing');
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	protected function sendRegistrationSummary(array $visitor, $guid)
386 386
 	{
387 387
 		$recipient = [
388
-			$visitor['email'] => $visitor['name']. ' ' . $visitor['surname'],
388
+			$visitor['email'] => $visitor['name'].' '.$visitor['surname'],
389 389
 		];
390 390
 
391 391
 		$code4bank = $this->calculateCode4Bank($visitor);
Please login to merge, or discard this patch.
app/presenters/ExportPresenter.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 class ExportPresenter extends BasePresenter
20 20
 {
21 21
 
22
-	const TEMPLATE_DIR = __DIR__ . '/../templates/Export/';
22
+	const TEMPLATE_DIR = __DIR__.'/../templates/Export/';
23 23
 	const TEMPLATE_EXT = 'latte';
24 24
 
25 25
 	/**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			$this->redirect('Export:listing');
110 110
 		}
111 111
 
112
-		switch($type){
112
+		switch($type) {
113 113
 			case "summary":
114 114
 				$templateName = 'evidence_summary';
115 115
 				// specific mPDF settings
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 		$attendances = $this->getModel()->attendance();
149 149
 
150 150
 		// prepare header
151
-		$attendanceHeader = $attendances[0]['place'] . ' ' . $attendances[0]['year'];
151
+		$attendanceHeader = $attendances[0]['place'].' '.$attendances[0]['year'];
152 152
 
153 153
 		// set header
154 154
 		$this->getPdf()->SetHeader($attendanceHeader.'|sraz VS|Prezenční listina');
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	public function renderMealTicket()
171 171
 	{
172 172
 		// output file name
173
-		$this->filename= 'vlastni_stravenky.pdf';
173
+		$this->filename = 'vlastni_stravenky.pdf';
174 174
 		$templateName = 'meal_ticket';
175 175
 
176 176
 		$mealTickets = $this->getModel()->mealTicket();
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$nameList = $this->getModel()->nameList();
199 199
 
200 200
 		// prepare header
201
-		$namelistHeader = $nameList[0]['place'] . " " . $nameList[0]['year'];
201
+		$namelistHeader = $nameList[0]['place']." ".$nameList[0]['year'];
202 202
 
203 203
 		// set header
204 204
 		$this->getPdf()->SetHeader($namelistHeader.'|sraz VS|Jméno, Příjmení, Přezdívka');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 */
219 219
 	public function renderProgram($type, $id)
220 220
 	{
221
-		$programMethod = 'renderProgram' . Strings::firstUpper($type);
221
+		$programMethod = 'renderProgram'.Strings::firstUpper($type);
222 222
 
223 223
 		call_user_func([$this, $programMethod], $id);
224 224
 	}
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		$this->filename = 'vlastni_programy.pdf';
235 235
 		$templateName = 'program_cards';
236 236
 
237
-		$this->getPdf()->SetWatermarkImage(IMG_DIR . 'logos/watermark.jpg', 0.1, '');
237
+		$this->getPdf()->SetWatermarkImage(IMG_DIR.'logos/watermark.jpg', 0.1, '');
238 238
 		$this->getPdf()->showWatermarkImage = true;
239 239
 
240 240
 		$parameters = [
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	{
256 256
 		$largeProgram = $this->getModel()->largeProgram();
257 257
 
258
-		$this->filename = Strings::toAscii($largeProgram['place'] . $largeProgram['year'] . '-program') . '.pdf';
258
+		$this->filename = Strings::toAscii($largeProgram['place'].$largeProgram['year'].'-program').'.pdf';
259 259
 		$templateName = 'program_large';
260 260
 
261 261
 		$meetingHeader = $largeProgram['place']." ".$largeProgram['year'];
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 	{
284 284
 		$templateName = 'program_public';
285 285
 		$publicProgram = $this->getModel()->publicProgram();
286
-		$this->filename = Strings::toAscii($publicProgram['place'] . $publicProgram['year'] . '-program' . '.pdf');
286
+		$this->filename = Strings::toAscii($publicProgram['place'].$publicProgram['year'].'-program'.'.pdf');
287 287
 
288
-		$meetingHeader = $publicProgram['place'] . ' ' . $publicProgram['year'];
288
+		$meetingHeader = $publicProgram['place'].' '.$publicProgram['year'];
289 289
 
290 290
 		$parameters = [
291 291
 			'header'		=> $meetingHeader,
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		];
320 320
 
321 321
 		$exportBlocks = [];
322
-		foreach ($days as $day) {
322
+		foreach($days as $day) {
323 323
 			$exportBlocks[$day] = $this->getBlockModel()->getExportBlocks($this->meetingId, $day);
324 324
 		}
325 325
 
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
 		if(!$namesStringified) {
407 407
 			$badges = $this->getModel()->nameBadges();
408 408
 		} else {
409
-			$namesStringified = preg_replace('/\s+/','',$namesStringified);
409
+			$namesStringified = preg_replace('/\s+/', '', $namesStringified);
410 410
 
411
-			$names = explode(',',$namesStringified);
411
+			$names = explode(',', $namesStringified);
412 412
 			foreach($names as $name) {
413 413
 				$badge['nick'] = $name;
414 414
 				$badges[] = $badge;
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 		}
417 417
 
418 418
 		$this->getPdf()->setMargins(15, 15, 10, 5);
419
-		$this->getPdf()->SetWatermarkImage(IMG_DIR . 'logos/watermark-waves.jpg', 0.1, '');
419
+		$this->getPdf()->SetWatermarkImage(IMG_DIR.'logos/watermark-waves.jpg', 0.1, '');
420 420
 		$this->getPdf()->showWatermarkImage = TRUE;
421 421
 
422 422
 		$parameters = [
@@ -524,13 +524,13 @@  discard block
 block discarded – undo
524 524
 		$i = 2;
525 525
 		foreach($visitors as $data) {
526 526
 			foreach($cellValues as $cell => $value) {
527
-				$list->setCellValue($cell . $i, $data[$value]);
527
+				$list->setCellValue($cell.$i, $data[$value]);
528 528
 			}
529 529
 			$i++;
530 530
 		}
531 531
 
532 532
 		// stahnuti souboru
533
-		$filename = 'export-MS-'.date('Y-m-d',time()).'.xlsx';
533
+		$filename = 'export-MS-'.date('Y-m-d', time()).'.xlsx';
534 534
 
535 535
 		$excel->setActiveSheetIndex(0);
536 536
 
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 	{
559 559
 		$template = $this->getTemplate();
560 560
 
561
-		foreach ($parameters as $parameter => $value) {
561
+		foreach($parameters as $parameter => $value) {
562 562
 			$template->{$parameter} = $value;
563 563
 		}
564 564
 
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 		$template = $this->getTemplate();
581 581
 
582 582
 		/* debugging */
583
-		if($this->debugMode){
583
+		if($this->debugMode) {
584 584
 			echo $template;
585 585
 			exit('DEBUG_MODE');
586 586
 		} else {
Please login to merge, or discard this patch.
app/presenters/RegistrationPresenter.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
 			$guid = $this->getVisitorService()->create($postData);
111 111
 			$result = $this->sendRegistrationSummary($postData, $guid);
112 112
 
113
-			Debugger::log('Creation of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
114
-			$this->flashMessage('Registrace(' . $guid . ') byla úspěšně založena.', 'ok');
113
+			Debugger::log('Creation of registration('.$guid.') successfull, result: '.json_encode($result), Debugger::INFO);
114
+			$this->flashMessage('Registrace('.$guid.') byla úspěšně založena.', 'ok');
115 115
 		} catch(Exception $e) {
116
-			Debugger::log('Creation of registration('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
117
-			$this->flashMessage('Creation of registration failed, result: ' . $e->getMessage(), 'error');
116
+			Debugger::log('Creation of registration('.$guid.') failed, result: '.$e->getMessage(), Debugger::ERROR);
117
+			$this->flashMessage('Creation of registration failed, result: '.$e->getMessage(), 'error');
118 118
 		}
119 119
 
120 120
 		$this->redirect('Registration:check', $guid);
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 			$result = $this->getVisitorService()->update($guid, $postData);
133 133
 			$result = $this->sendRegistrationSummary($postData, $guid);
134 134
 
135
-			Debugger::log('Modification of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
136
-			$this->flashMessage('Registrace(' . $guid . ') byla úspěšně upravena.', 'ok');
135
+			Debugger::log('Modification of registration('.$guid.') successfull, result: '.json_encode($result), Debugger::INFO);
136
+			$this->flashMessage('Registrace('.$guid.') byla úspěšně upravena.', 'ok');
137 137
 		} catch(Exception $e) {
138
-			Debugger::log('Modification of registration('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
139
-			$this->flashMessage('Modification of registration(' . $guid . ') failed, result: ' . $e->getMessage(), 'error');
138
+			Debugger::log('Modification of registration('.$guid.') failed, result: '.$e->getMessage(), Debugger::ERROR);
139
+			$this->flashMessage('Modification of registration('.$guid.') failed, result: '.$e->getMessage(), 'error');
140 140
 		}
141 141
 
142 142
 		$this->redirect('Registration:check', $guid);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		$template->province = $this->getMeetingModel()->renderHtmlProvinceSelect(null);
165 165
 		$template->programs = $this->getVisitorModel()->renderProgramSwitcher($this->getMeetingId(), null);
166 166
 		$template->meetingId = $this->getMeetingId();
167
-		$template->cost	= $this->getMeetingModel()->getPrice('cost');
167
+		$template->cost = $this->getMeetingModel()->getPrice('cost');
168 168
 
169 169
 		if($this->getUserservice()->isLoggedIn()) {
170 170
 			$userDetail = $this->getUserModel()->getUserDetail();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 			$template->data['email'] = $skautisUser->Email;
184 184
 			$template->data['street'] = $skautisUser->Street;
185 185
 			$template->data['city'] = $skautisUser->City;
186
-			$template->data['postal_code'] = preg_replace('/\s+/','',$skautisUser->Postcode);
186
+			$template->data['postal_code'] = preg_replace('/\s+/', '', $skautisUser->Postcode);
187 187
 			$template->data['birthday'] = $skautisUser->Birthday;
188 188
 			$template->data['group_name'] = $skautisUserUnit->DisplayName;
189 189
 			$template->data['group_num'] = $skautisUserUnit->RegistrationNumber;
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		$template->meals = $this->getMealModel()->renderHtmlMealsSelect($mealData, $this->disabled);
234 234
 		$template->province = $this->getMeetingModel()->renderHtmlProvinceSelect($data->province);
235 235
 		$template->programs = $this->getVisitorModel()->renderProgramSwitcher($data->meeting, $data->id);
236
-		$template->cost	= $this->getMeetingModel()->getPrice('cost');
236
+		$template->cost = $this->getMeetingModel()->getPrice('cost');
237 237
 	}
238 238
 
239 239
 	/**
Please login to merge, or discard this patch.
app/presenters/BlockPresenter.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$template->day_roll = $this->renderHtmlSelectBox('day', $this->days, null, 'width:172px;');
61 61
 		$template->hour_roll = $this->renderHtmlSelectBox('start_hour', $this->hours, date('H'));
62 62
 		$template->minute_roll = $this->renderHtmlSelectBox('start_minute', $this->minutes, date('i'));
63
-		$template->end_hour_roll = $this->renderHtmlSelectBox('end_hour', $this->hours, date('H')+1);
63
+		$template->end_hour_roll = $this->renderHtmlSelectBox('end_hour', $this->hours, date('H') + 1);
64 64
 		$template->end_minute_roll = $this->renderHtmlSelectBox('end_minute', $this->minutes, date('i'));
65 65
 		// is program block check box
66 66
 		$template->program_checkbox = $this->renderHtmlCheckBox('program', 1, 0);
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 			$this->guardToGreaterThanFrom($data['from'], $data['to']);
93 93
 			$result = $this->getModel()->create($data);
94 94
 
95
-			Debugger::log('Creation of block successfull, result: ' . json_encode($result), Debugger::INFO);
95
+			Debugger::log('Creation of block successfull, result: '.json_encode($result), Debugger::INFO);
96 96
 
97 97
 			$this->flashMessage('Položka byla úspěšně vytvořena', 'ok');
98 98
 		} catch(Exception $e) {
99
-			Debugger::log('Creation of block with data ' . json_encode($data) . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
99
+			Debugger::log('Creation of block with data '.json_encode($data).' failed, result: '.$e->getMessage(), Debugger::ERROR);
100 100
 
101
-			$this->flashMessage('Creation of block failed, result: ' . $e->getMessage(), 'error');
101
+			$this->flashMessage('Creation of block failed, result: '.$e->getMessage(), 'error');
102 102
 		}
103 103
 
104 104
 		$this->redirect($this->getBacklink() ?: 'Block:listing');
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 			$this->guardToGreaterThanFrom($data['from'], $data['to']);
129 129
 			$result = $this->getModel()->update($id, $data);
130 130
 
131
-			Debugger::log('Modification of block id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
131
+			Debugger::log('Modification of block id '.$id.' with data '.json_encode($data).' successfull, result: '.json_encode($result), Debugger::INFO);
132 132
 
133 133
 			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
134 134
 		} catch(Exception $e) {
135
-			Debugger::log('Modification of block id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
135
+			Debugger::log('Modification of block id '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
136 136
 
137
-			$this->flashMessage('Modification of block id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
137
+			$this->flashMessage('Modification of block id '.$id.' failed, result: '.$e->getMessage(), 'error');
138 138
 		}
139 139
 
140 140
 		$this->redirect($this->getBacklink() ?: 'Block:listing');
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 			$data = $this->getRequest()->getPost();
151 151
 			$result = $this->updateByGuid($id, $data);
152 152
 
153
-			Debugger::log('Modification of block annotation id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
153
+			Debugger::log('Modification of block annotation id '.$id.' with data '.json_encode($data).' successfull, result: '.json_encode($result), Debugger::INFO);
154 154
 
155 155
 			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
156 156
 		} catch(Exception $e) {
157
-			Debugger::log('Modification of block annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
157
+			Debugger::log('Modification of block annotation guid '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
158 158
 
159
-			$this->flashMessage('Modification of block annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
159
+			$this->flashMessage('Modification of block annotation guid '.$id.' failed, result: '.$e->getMessage(), 'error');
160 160
 		}
161 161
 
162 162
 		$this->redirect('Block:annotation', $id);
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 	{
171 171
 		try {
172 172
 			$result = $this->getModel()->delete($id);
173
-			Debugger::log('Destroying of block successfull, result: ' . json_encode($result), Debugger::INFO);
173
+			Debugger::log('Destroying of block successfull, result: '.json_encode($result), Debugger::INFO);
174 174
 			$this->flashMessage('Položka byla úspěšně smazána.', 'ok');
175 175
 		} catch(Exception $e) {
176
-			Debugger::log('Destroying of block failed, result: ' .  $e->getMessage(), Debugger::ERROR);
177
-			$this->flashMessage('Destroying of block failed, result: ' . $e->getMessage(), 'error');
176
+			Debugger::log('Destroying of block failed, result: '.$e->getMessage(), Debugger::ERROR);
177
+			$this->flashMessage('Destroying of block failed, result: '.$e->getMessage(), 'error');
178 178
 		}
179 179
 
180 180
 		$this->redirect('Block:listing');
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
 
194 194
 			$this->getEmailer()->tutor($recipients, $tutors->guid, 'block');
195 195
 
196
-			Debugger::log('Sending email to block tutor successfull, result: ' . json_encode($recipients) . ', ' . $tutors->guid, Debugger::INFO);
196
+			Debugger::log('Sending email to block tutor successfull, result: '.json_encode($recipients).', '.$tutors->guid, Debugger::INFO);
197 197
 			$this->flashMessage('Email lektorovi byl odeslán..', 'ok');
198 198
 		} catch(Exception $e) {
199
-			Debugger::log('Sending email to block tutor failed, result: ' .  $e->getMessage(), Debugger::ERROR);
200
-			$this->flashMessage('Email lektorovi nebyl odeslán, result: ' . $e->getMessage(), 'error');
199
+			Debugger::log('Sending email to block tutor failed, result: '.$e->getMessage(), Debugger::ERROR);
200
+			$this->flashMessage('Email lektorovi nebyl odeslán, result: '.$e->getMessage(), 'error');
201 201
 		}
202 202
 
203 203
 		$this->redirect('Block:edit', $id);
@@ -304,13 +304,13 @@  discard block
 block discarded – undo
304 304
 	 */
305 305
 	private function renderHtmlSelectBox($name, $select_content, $selected_option, $inline_style = NULL)
306 306
 	{
307
-		if(isset($inline_style) && $inline_style != NULL){
307
+		if(isset($inline_style) && $inline_style != NULL) {
308 308
 			$style = " style='".$inline_style."'";
309 309
 		} else {
310 310
 			$style = "";
311 311
 		}
312 312
 		$html_select = "<select name='".$name."'".$style.">";
313
-		foreach ($select_content as $key => $value) {
313
+		foreach($select_content as $key => $value) {
314 314
 			if($key == $selected_option) {
315 315
 				$selected = 'selected';
316 316
 			} else {
Please login to merge, or discard this patch.
app/presenters/ProgramPresenter.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
 		try {
86 86
 			$result = $this->getModel()->create($data);
87 87
 
88
-			Debugger::log('Creation of program successfull, result: ' . json_encode($result), Debugger::INFO);
88
+			Debugger::log('Creation of program successfull, result: '.json_encode($result), Debugger::INFO);
89 89
 
90 90
 			$this->flashMessage('Položka byla úspěšně vytvořena', 'ok');
91 91
 		} catch(Exception $e) {
92
-			Debugger::log('Creation of program with data ' . json_encode($data) . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
92
+			Debugger::log('Creation of program with data '.json_encode($data).' failed, result: '.$e->getMessage(), Debugger::ERROR);
93 93
 
94
-			$this->flashMessage('Záznam se nepodařilo uložit, result: ' . $e->getMessage(), 'error');
94
+			$this->flashMessage('Záznam se nepodařilo uložit, result: '.$e->getMessage(), 'error');
95 95
 		}
96 96
 
97 97
 		$this->redirect($this->getBacklink() ?: 'Program:listing');
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 		try {
117 117
 			$result = $this->getModel()->update($id, $data);
118 118
 
119
-			Debugger::log('Modification of program id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
119
+			Debugger::log('Modification of program id '.$id.' with data '.json_encode($data).' successfull, result: '.json_encode($result), Debugger::INFO);
120 120
 
121 121
 			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
122 122
 		} catch(Exception $e) {
123
-			Debugger::log('Modification of program id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
123
+			Debugger::log('Modification of program id '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
124 124
 
125
-			$this->flashMessage('Modification of program id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
125
+			$this->flashMessage('Modification of program id '.$id.' failed, result: '.$e->getMessage(), 'error');
126 126
 		}
127 127
 
128 128
 		$this->redirect($this->getBacklink() ?: 'Program:listing');
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 	{
137 137
 		try {
138 138
 			$result = $this->getModel()->delete($id);
139
-			Debugger::log('Destroying of program successfull, result: ' . json_encode($result), Debugger::INFO);
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);
143
-			$this->flashMessage('Smazání programu se nezdařilo, result: ' . $e->getMessage(), 'error');
142
+			Debugger::log('Destroying of program failed, result: '.$e->getMessage(), Debugger::ERROR);
143
+			$this->flashMessage('Smazání programu se nezdařilo, result: '.$e->getMessage(), 'error');
144 144
 		}
145 145
 
146 146
 		$this->redirect('Program:listing');
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
 			$data = $this->getRequest()->getPost();
157 157
 			$result = $this->updateByGuid($id, $data);
158 158
 
159
-			Debugger::log('Modification of program annotation id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
159
+			Debugger::log('Modification of program annotation id '.$id.' with data '.json_encode($data).' successfull, result: '.json_encode($result), Debugger::INFO);
160 160
 
161 161
 			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
162 162
 		} catch(Exception $e) {
163
-			Debugger::log('Modification of program annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
163
+			Debugger::log('Modification of program annotation guid '.$id.' failed, result: '.$e->getMessage(), Debugger::ERROR);
164 164
 
165
-			$this->flashMessage('Modification of program annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
165
+			$this->flashMessage('Modification of program annotation guid '.$id.' failed, result: '.$e->getMessage(), 'error');
166 166
 		}
167 167
 
168 168
 		$this->redirect('Program:annotation', $id);
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
 
180 180
 			$this->getEmailer()->tutor($recipients, $tutors->guid, 'program');
181 181
 
182
-			Debugger::log('Sending email to program tutor successfull, result: ' . json_encode($recipients) . ', ' . $tutors->guid, Debugger::INFO);
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);
186
-			$this->flashMessage('Email lektorovi nebyl odeslán, result: ' . $e->getMessage(), 'error');
185
+			Debugger::log('Sending email to program tutor failed, result: '.$e->getMessage(), Debugger::ERROR);
186
+			$this->flashMessage('Email lektorovi nebyl odeslán, result: '.$e->getMessage(), 'error');
187 187
 		}
188 188
 
189 189
 		$this->redirect('Program:edit', $id);
@@ -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/services/VisitorService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@
 block discarded – undo
103 103
 		$blocks = $this->getBlockModel()->idsFromCurrentMeeting($data['meeting']);
104 104
 
105 105
 		$programs = array_map(function($block) use ($data) {
106
-			if(!array_key_exists('blck_' . $block['id'], $data)) {
106
+			if(!array_key_exists('blck_'.$block['id'], $data)) {
107 107
 				return 0;
108 108
 			}
109 109
 
110
-			return $data['blck_' . $block['id']];
110
+			return $data['blck_'.$block['id']];
111 111
 		}, $blocks);
112 112
 
113 113
 		return $programs;
Please login to merge, or discard this patch.
app/services/BaseService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	protected function save($id, $val)
76 76
 	{
77
-		if ($this->useCache) {
77
+		if($this->useCache) {
78 78
 			self::$storage[$id] = $val;
79 79
 		}
80 80
 		return $val;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	protected function load($id)
91 91
 	{
92
-		if ($this->useCache && array_key_exists($id, self::$storage)) {
92
+		if($this->useCache && array_key_exists($id, self::$storage)) {
93 93
 			return self::$storage[$id];
94 94
 		}
95 95
 		return FALSE;
Please login to merge, or discard this patch.