TidyUp: Surpress errors on unreachable statements with link to discussion on github.

This commit is contained in:
Hereward Mills
2015-12-04 08:09:01 +00:00
parent 2686dd640c
commit 6aa3e21b4c
4 changed files with 4 additions and 1 deletions
@@ -397,6 +397,7 @@ class AssetsController extends AdminController
// Redirect to the asset management page with error
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
return Redirect::to("hardware/$assetId/edit")->with('error', Lang::get('admin/hardware/message.update.error'));
}
@@ -143,6 +143,7 @@ class LocationsController extends AdminController
}
// Redirect to the location create page
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
return Redirect::to('admin/settings/locations/create')->with('error', Lang::get('admin/locations/message.create.error'));
}
+1 -1
View File
@@ -82,7 +82,7 @@ class ModelsController extends AdminController
if ($validator->fails())
{
// The given data did not pass validation
return Redirect::back()->withInput()->with('error', Lang::get('admin/models/message.create.duplicate_set'));;
return Redirect::back()->withInput()->with('error', Lang::get('admin/models/message.create.duplicate_set'));
}
@@ -587,6 +587,7 @@ class UsersController extends AdminController {
return Redirect::route('users')->with('error', 'Bulk delete is not enabled in this installation');
}
/** @noinspection PhpUnreachableStatementInspection Known to be unreachable but kept following discussion: https://github.com/snipe/snipe-it/pull/1423 */
return Redirect::route('users')->with('error', 'An error has occurred');
}
}