Code Duplication    Length = 13-13 lines in 2 locations

app/presenters/BlockPresenter.php 1 location

@@ 152-164 (lines=13) @@
149
	 * @param  int  $id
150
	 * @return void
151
	 */
152
	public function actionDelete($id)
153
	{
154
		try {
155
			$result = $this->getModel()->delete($id);
156
			Debugger::log('Destroying of block successfull, result: ' . json_encode($result), Debugger::INFO);
157
			$this->flashMessage('Položka byla úspěšně smazána.', 'ok');
158
		} catch(Exception $e) {
159
			Debugger::log('Destroying of block failed, result: ' .  $e->getMessage(), Debugger::ERROR);
160
			$this->flashMessage('Destroying of block failed, result: ' . $e->getMessage(), 'error');
161
		}
162
163
		$this->redirect('Block:listing');
164
	}
165
166
	/**
167
	 * Send mail to tutor

app/presenters/CategoryPresenter.php 1 location

@@ 28-40 (lines=13) @@
25
	 * @param  int  $id
26
	 * @return void
27
	 */
28
	public function actionDelete($id)
29
	{
30
		try {
31
			$result = $this->getModel()->delete($id);
32
			Debugger::log('Destroying of category successfull, result: ' . json_encode($result), Debugger::INFO);
33
			$this->flashMessage('Položka byla úspěšně smazána', 'ok');
34
		} catch(Exception $e) {
35
			Debugger::log('Destroying of category failed, result: ' .  $e->getMessage(), Debugger::ERROR);
36
			$this->flashMessage('Destroying of category failed, result: ' . $e->getMessage(), 'error');
37
		}
38
39
		$this->redirect('Category:listing');
40
	}
41
42
	/**
43
	 * @return void