fix formatting and docblock

This commit is contained in:
Dennis Eichhorn 2019-07-08 19:15:25 +02:00
parent 08bf6984cd
commit 5b56b7367d
2 changed files with 15 additions and 8 deletions

View File

@ -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) {

View File

@ -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,