From 5ef33b0630e1264cd13c36190247b548438911f7 Mon Sep 17 00:00:00 2001 From: manavo Date: Tue, 25 Nov 2014 21:57:32 +0000 Subject: [PATCH] Fix indentation --- app/controllers/ApiController.php | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/app/controllers/ApiController.php b/app/controllers/ApiController.php index e1cde6fb..683adaf6 100644 --- a/app/controllers/ApiController.php +++ b/app/controllers/ApiController.php @@ -44,23 +44,23 @@ public function postComponents() { $component = new Component(Input::all()); $component->user_id = $this->auth->user()->id; - return $this->_saveComponent($component); + return $this->_saveComponent($component); } - /** - * Update an existing component - * - * @param int $id - * - * @return Component - */ - public function putComponent($id) { - $component = $this->getComponent($id); + /** + * Update an existing component + * + * @param int $id + * + * @return Component + */ + public function putComponent($id) { + $component = $this->getComponent($id); - $component->fill(Input::all()); + $component->fill(Input::all()); - return $this->_saveComponent($component); - } + return $this->_saveComponent($component); + } /** * Get all incidents @@ -136,25 +136,25 @@ } } - /** - * Function for saving the component, and returning appropriate error codes - * - * @param Component $component - * - * @return Component - */ - private function _saveComponent($component) { - if ($component->isValid()) { - try { - $component->saveOrFail(); - return $component; - } catch (Exception $e) { - App::abort(500, $e->getMessage()); - } - } else { - App::abort(404, $component->getErrors()->first()); - } - } + /** + * Function for saving the component, and returning appropriate error codes + * + * @param Component $component + * + * @return Component + */ + private function _saveComponent($component) { + if ($component->isValid()) { + try { + $component->saveOrFail(); + return $component; + } catch (Exception $e) { + App::abort(500, $e->getMessage()); + } + } else { + App::abort(404, $component->getErrors()->first()); + } + } /** * Function for saving the incident, and returning appropriate error codes