Code Duplication    Length = 13-13 lines in 3 locations

app/presenters/BlockPresenter.php 1 location

@@ 169-181 (lines=13) @@
166
	 * @param  int  $id
167
	 * @return void
168
	 */
169
	public function actionDelete($id)
170
	{
171
		try {
172
			$result = $this->getModel()->delete($id);
173
			Debugger::log('Destroying of block successfull, result: ' . json_encode($result), Debugger::INFO);
174
			$this->flashMessage('Položka byla úspěšně smazána.', 'ok');
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');
178
		}
179
180
		$this->redirect('Block:listing');
181
	}
182
183
	/**
184
	 * Send mail to tutor

app/presenters/CategoryPresenter.php 1 location

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

app/presenters/ProgramPresenter.php 1 location

@@ 135-147 (lines=13) @@
132
	 * @param  integer  $id
133
	 * @return void
134
	 */
135
	public function actionDelete($id)
136
	{
137
		try {
138
			$result = $this->getModel()->delete($id);
139
			Debugger::log('Destroying of program successfull, result: ' . json_encode($result), Debugger::INFO);
140
			$this->flashMessage('Položka byla úspěšně smazána.', 'ok');
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');
144
		}
145
146
		$this->redirect('Program:listing');
147
	}
148
149
	/**
150
	 * @param  integer $id