From 0344904631e45fe0f8ed293c979dd2072164d039 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 11 Apr 2022 10:57:08 +0200 Subject: [PATCH] AkteLib.php, DmsLib.php coding style fixes: - splitted too long parameter lines - method call closing parenthesis on new line --- application/libraries/AkteLib.php | 5 ++++- application/libraries/DmsLib.php | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/application/libraries/AkteLib.php b/application/libraries/AkteLib.php index 28094aabb..174b21b6c 100644 --- a/application/libraries/AkteLib.php +++ b/application/libraries/AkteLib.php @@ -29,7 +29,10 @@ class AkteLib * adds a new dms version 0 for the written file, and adds Akte if dms add was successfull * Returns success with inserted akte id or error */ - public function add($person_id, $dokument_kurzbz, $titel, $mimetype, $fileHandle, $bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false) + public function add( + $person_id, $dokument_kurzbz, $titel, $mimetype, $fileHandle, // Required parameters + $bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false + ) { // add new dms entry and new dms version for the Akte, using Akte data (title, mimetype, file content as handle) $dmsAddResult = $this->_ci->dmslib->add($titel, $mimetype, $fileHandle, self::AKTE_KATEGORIE_KURZBZ, $dokument_kurzbz, $bezeichnung); diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php index 017c7fc08..504e94a41 100644 --- a/application/libraries/DmsLib.php +++ b/application/libraries/DmsLib.php @@ -31,7 +31,10 @@ class DmsLib * Writes a new file, adds a new dms entry and a new dms version 0 for the written file * Returns success info of added dms entry (dms_id, version, filename) or error */ - public function add($name, $mimetype, $fileHandle, $kategorie_kurzbz = null, $dokument_kurzbz = null, $beschreibung = null, $cis_suche = false, $schlagworte = null) + public function add( + $name, $mimetype, $fileHandle, // Required parameters + $kategorie_kurzbz = null, $dokument_kurzbz = null, $beschreibung = null, $cis_suche = false, $schlagworte = null + ) { // write file with content of fileHandle $writeFileResult = $this->_writeNewFile($name, $fileHandle); @@ -633,7 +636,8 @@ class DmsLib // Insert DMS version if (!$result = $this->_ci->DmsVersionModel->insert( - $this->_ci->DmsVersionModel->filterFields($dms, getData($result), $filename))) + $this->_ci->DmsVersionModel->filterFields($dms, getData($result), $filename)) + ) { return error('Failed inserting DMS version'); }