* use php-cs-fixer instead of phpcodesniffer * updated scrutinizer config * adjusted code yules to all files * updated CONTRIBUTING guidelines
This commit is contained in:
@@ -133,9 +133,15 @@ class TimesheetController extends AbstractController
|
||||
*/
|
||||
public function deleteAction(Timesheet $entry, Request $request)
|
||||
{
|
||||
$entityManager = $this->getDoctrine()->getManager();
|
||||
$entityManager->remove($entry);
|
||||
$entityManager->flush();
|
||||
try {
|
||||
$entityManager = $this->getDoctrine()->getManager();
|
||||
$entityManager->remove($entry);
|
||||
$entityManager->flush();
|
||||
|
||||
$this->flashSuccess('action.deleted_successfully');
|
||||
} catch (\Exception $ex) {
|
||||
$this->flashError('action.deleted.error', ['%reason%' => $ex->getMessage()]);
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('admin_timesheet_paginated', ['page' => $request->get('page')]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user