From caff1023ea72bb2ea94130e18a2a6e2ccf819e5f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 14:19:56 +0200 Subject: Format control structures, classes, methods and function To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst --- apps/admin_audit/lib/AppInfo/Application.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apps/admin_audit/lib/AppInfo/Application.php') diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 7e6c5410f6e..34c432a078e 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -74,12 +74,11 @@ class Application extends App { $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/audit.log'; $logFile = $config->getAppValue('admin_audit', 'logfile', $default); - if($logFile === null) { + if ($logFile === null) { $this->logger = $c->getLogger(); return; } $this->logger = $c->getLogFactory()->getCustomLogger($logFile); - } public function register() { @@ -152,7 +151,6 @@ class Application extends App { } protected function appHooks() { - $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) { $appActions = new AppManagement($this->logger); @@ -166,7 +164,6 @@ class Application extends App { $appActions = new AppManagement($this->logger); $appActions->disableApp($event->getAppID()); }); - } protected function consoleHooks() { -- cgit v1.2.3