From 5b56b7367dfa15b58758001b3ca824d9b72f267a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 8 Jul 2019 19:15:25 +0200 Subject: [PATCH] fix formatting and docblock --- Account/PermissionHandlingTrait.php | 11 +++++++++-- Module/ModuleAbstract.php | 12 ++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Account/PermissionHandlingTrait.php b/Account/PermissionHandlingTrait.php index c9db01de4..eaec3f061 100644 --- a/Account/PermissionHandlingTrait.php +++ b/Account/PermissionHandlingTrait.php @@ -115,8 +115,15 @@ trait PermissionHandlingTrait * * @since 1.0.0 */ - public function hasPermission(int $permission, int $unit = null, string $app = null, string $module = null, int $type = null, int $element = null, int $component = null) : bool - { + public function hasPermission( + int $permission, + int $unit = null, + string $app = null, + string $module = null, + int $type = null, + int $element = null, + int $component = null + ) : bool { $app = $app !== null ? \strtolower($app) : $app; foreach ($this->permissions as $p) { diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index 56129a49f..1b725459c 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -239,21 +239,21 @@ abstract class ModuleAbstract /** * Create a model * - * @param RequestAbstract $request Request - * @param mixed $obj Response object - * @param string $mapper Object mapper - * @param string $trigger Trigger for the event manager + * @param int $account Account id + * @param mixed $obj Response object + * @param string $mapper Object mapper + * @param string $trigger Trigger for the event manager * * @return void * * @since 1.0.0 */ - protected function createModel(RequestAbstract $request, $obj, string $mapper, string $trigger) : void + protected function createModel(int $account, $obj, string $mapper, string $trigger) : void { $this->app->eventManager->trigger('PRE:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', $obj); $mapper::create($obj); $this->app->eventManager->trigger('POST:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', [ - $request->getHEader()->getAccount(), + $account, null, $obj, 0, 0, static::MODULE_NAME,