Code Duplication    Length = 17-17 lines in 2 locations

app/presenters/VisitorPresenter.php 2 locations

@@ 198-214 (lines=17) @@
195
	 * @param  integer|string $ids
196
	 * @return void
197
	 */
198
	public function actionPay($id)
199
	{
200
		try {
201
			$visitor = $this->getModel();
202
			$visitor->payCharge($id, 'cost');
203
			$recipients = $visitor->getRecipients($id);
204
			$this->getEmailer()->sendPaymentInfo($recipients, 'advance');
205
206
			Debugger::log('Visitor: Action pay for id ' . $id . ' successfull, result: ' . $e->getMessage(), Debugger::INFO);
207
			$this->flashMessage('Platba byla zaplacena.', 'ok');
208
		} catch(Exception $e) {
209
			Debugger::log('Visitor: Action pay for id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
210
			$this->flashMessage('Visitor: Action pay for id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
211
		}
212
213
		$this->redirect('Visitor:listing');
214
	}
215
216
	/**
217
	 * @param  string|interger $ids
@@ 220-236 (lines=17) @@
217
	 * @param  string|interger $ids
218
	 * @return void
219
	 */
220
	public function actionAdvance($id)
221
	{
222
		try {
223
			$visitor = $this->getModel();
224
			$visitor->payCharge($id, 'advance');
225
			$recipients = $visitor->getRecipients($id);
226
			$this->getEmailer()->sendPaymentInfo($recipients, 'advance');
227
228
			Debugger::log('Visitor: Action advance for id ' . $id . ' successfull, result: ' . $e->getMessage(), Debugger::INFO);
229
			$this->flashMessage('Záloha byla zaplacena.', 'ok');
230
		} catch(Exception $e) {
231
			Debugger::log('Visitor: Action advance for id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
232
			$this->flashMessage('Visitor: Action advance for id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
233
		}
234
235
		$this->redirect('Visitor:listing');
236
	}
237
238
	/**
239
	 * Set item as checked by id