aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Action/Exception
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2023-09-02 14:42:51 +0200
committerGitHub <noreply@github.com>2023-09-02 14:42:51 +0200
commit5ff5424d8c81c7123d8656a787af2ff85b3dec21 (patch)
tree322929ee01d892bb3c927e7fe1238369c647f820 /inc/Action/Exception
parent0613df3287b82a98b1e97cf86ed9d4c8fbd16f1c (diff)
parent91560755291852b8302767d454183a7662666f7e (diff)
downloaddokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.tar.gz
dokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.zip
Merge pull request #4045 from dokuwiki/autofix
Use Rector to autofix code smell
Diffstat (limited to 'inc/Action/Exception')
-rw-r--r--inc/Action/Exception/ActionAbort.php4
-rw-r--r--inc/Action/Exception/ActionAclRequiredException.php4
-rw-r--r--inc/Action/Exception/ActionDisabledException.php4
-rw-r--r--inc/Action/Exception/ActionException.php19
-rw-r--r--inc/Action/Exception/ActionUserRequiredException.php4
-rw-r--r--inc/Action/Exception/FatalException.php6
-rw-r--r--inc/Action/Exception/NoActionException.php4
7 files changed, 25 insertions, 20 deletions
diff --git a/inc/Action/Exception/ActionAbort.php b/inc/Action/Exception/ActionAbort.php
index 9c188bb4b..4f9006be5 100644
--- a/inc/Action/Exception/ActionAbort.php
+++ b/inc/Action/Exception/ActionAbort.php
@@ -15,6 +15,6 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class ActionAbort extends ActionException {
-
+class ActionAbort extends ActionException
+{
}
diff --git a/inc/Action/Exception/ActionAclRequiredException.php b/inc/Action/Exception/ActionAclRequiredException.php
index 64a2c61e3..083fe2a17 100644
--- a/inc/Action/Exception/ActionAclRequiredException.php
+++ b/inc/Action/Exception/ActionAclRequiredException.php
@@ -12,6 +12,6 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class ActionAclRequiredException extends ActionException {
-
+class ActionAclRequiredException extends ActionException
+{
}
diff --git a/inc/Action/Exception/ActionDisabledException.php b/inc/Action/Exception/ActionDisabledException.php
index 40a0c7dd7..cf3c07781 100644
--- a/inc/Action/Exception/ActionDisabledException.php
+++ b/inc/Action/Exception/ActionDisabledException.php
@@ -12,6 +12,6 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class ActionDisabledException extends ActionException {
-
+class ActionDisabledException extends ActionException
+{
}
diff --git a/inc/Action/Exception/ActionException.php b/inc/Action/Exception/ActionException.php
index 381584c15..57318fb04 100644
--- a/inc/Action/Exception/ActionException.php
+++ b/inc/Action/Exception/ActionException.php
@@ -13,8 +13,8 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class ActionException extends \Exception {
-
+class ActionException extends \Exception
+{
/** @var string the new action */
protected $newaction;
@@ -30,11 +30,12 @@ class ActionException extends \Exception {
* @param string|null $newaction the action that should be used next
* @param string $message optional message, will not be shown except for some dub classes
*/
- public function __construct($newaction = null, $message = '') {
+ public function __construct($newaction = null, $message = '')
+ {
global $INPUT;
parent::__construct($message);
- if(is_null($newaction)) {
- if(strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post') {
+ if (is_null($newaction)) {
+ if (strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post') {
$newaction = 'redirect';
} else {
$newaction = 'show';
@@ -49,7 +50,8 @@ class ActionException extends \Exception {
*
* @return string
*/
- public function getNewAction() {
+ public function getNewAction()
+ {
return $this->newaction;
}
@@ -59,8 +61,9 @@ class ActionException extends \Exception {
* @param null|bool $set when null is given, the current setting is not changed
* @return bool
*/
- public function displayToUser($set = null) {
- if(!is_null($set)) $this->displayToUser = $set;
+ public function displayToUser($set = null)
+ {
+ if (!is_null($set)) $this->displayToUser = $set;
return $set;
}
}
diff --git a/inc/Action/Exception/ActionUserRequiredException.php b/inc/Action/Exception/ActionUserRequiredException.php
index aab06cca1..33ff328a1 100644
--- a/inc/Action/Exception/ActionUserRequiredException.php
+++ b/inc/Action/Exception/ActionUserRequiredException.php
@@ -12,6 +12,6 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class ActionUserRequiredException extends ActionException {
-
+class ActionUserRequiredException extends ActionException
+{
}
diff --git a/inc/Action/Exception/FatalException.php b/inc/Action/Exception/FatalException.php
index 42e30ccae..74f45cccb 100644
--- a/inc/Action/Exception/FatalException.php
+++ b/inc/Action/Exception/FatalException.php
@@ -12,7 +12,8 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class FatalException extends \Exception {
+class FatalException extends \Exception
+{
/**
* FatalException constructor.
*
@@ -20,7 +21,8 @@ class FatalException extends \Exception {
* @param int $status the HTTP status to send
* @param null|\Exception $previous previous exception
*/
- public function __construct($message = 'A fatal error occured', $status = 500, $previous = null) {
+ public function __construct($message = 'A fatal error occured', $status = 500, $previous = null)
+ {
parent::__construct($message, $status, $previous);
}
}
diff --git a/inc/Action/Exception/NoActionException.php b/inc/Action/Exception/NoActionException.php
index 1c4e4d094..23838972f 100644
--- a/inc/Action/Exception/NoActionException.php
+++ b/inc/Action/Exception/NoActionException.php
@@ -10,6 +10,6 @@ namespace dokuwiki\Action\Exception;
*
* @package dokuwiki\Action\Exception
*/
-class NoActionException extends \Exception {
-
+class NoActionException extends \Exception
+{
}