From d2247221bbf23a8fe19f66ea4ad7d0a59ffaa5b4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 1 Aug 2024 20:31:40 +0200 Subject: Minor update whitespace PHPCS rules (#6666) * Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules --- lib/Minz/Dispatcher.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/Minz/Dispatcher.php') diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php index 85f342dad..95460291f 100644 --- a/lib/Minz/Dispatcher.php +++ b/lib/Minz/Dispatcher.php @@ -41,22 +41,22 @@ final class Minz_Dispatcher { self::$needsReset = false; try { - $this->createController (Minz_Request::controllerName ()); - $this->controller->init (); - $this->controller->firstAction (); + $this->createController(Minz_Request::controllerName()); + $this->controller->init(); + $this->controller->firstAction(); // @phpstan-ignore booleanNot.alwaysTrue if (!self::$needsReset) { - $this->launchAction ( - Minz_Request::actionName () + $this->launchAction( + Minz_Request::actionName() . 'Action' ); } - $this->controller->lastAction (); + $this->controller->lastAction(); // @phpstan-ignore booleanNot.alwaysTrue if (!self::$needsReset) { $this->controller->declareCspHeader(); - $this->controller->view ()->build (); + $this->controller->view()->build(); } } catch (Minz_Exception $e) { throw $e; @@ -87,14 +87,14 @@ final class Minz_Dispatcher { } if (!class_exists($controller_name)) { - throw new Minz_ControllerNotExistException ( + throw new Minz_ControllerNotExistException( Minz_Exception::ERROR ); } $controller = new $controller_name(); if (!($controller instanceof Minz_ActionController)) { - throw new Minz_ControllerNotActionControllerException ( + throw new Minz_ControllerNotActionControllerException( $controller_name, Minz_Exception::ERROR ); @@ -111,7 +111,7 @@ final class Minz_Dispatcher { private function launchAction(string $action_name): void { $call = [$this->controller, $action_name]; if (!is_callable($call)) { - throw new Minz_ActionException ( + throw new Minz_ActionException( get_class($this->controller), $action_name, Minz_Exception::ERROR -- cgit v1.2.3