From 39a95d3c39f77cdf5ff93a59229dcb62e130248b Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 27 Mar 2019 16:45:32 +0100 Subject: [PATCH] MVC, stylefix in ApiMutableModelControllerBase --- .../OPNsense/Base/ApiMutableModelControllerBase.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php b/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php index a6158dad6..f6b359767 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php @@ -30,7 +30,6 @@ namespace OPNsense\Base; -use \OPNsense\Base\UserException; use \OPNsense\Core\ACL; use \OPNsense\Core\Config; @@ -122,6 +121,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array result / validation output * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ protected function validateAndSave($node = null, $prefix = null) { @@ -177,6 +177,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array result / validation output * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws \OPNsense\Base\UserException when denied write access */ protected function save() { @@ -208,6 +209,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array status / validation errors * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ public function setAction() { @@ -289,6 +291,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ public function addBase($post_field, $path, $overlay = null) { @@ -327,6 +330,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ public function delBase($path, $uuid) { @@ -360,6 +364,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ public function setBase($post_field, $path, $uuid, $overlay = null) { @@ -395,6 +400,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @return array * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails + * @throws UserException when denied write access */ public function toggleBase($path, $uuid, $enabled = null) {