From 50b15b9506ada180acadbdbb900a83deda90d9a3 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 6 Aug 2024 09:47:39 +0200 Subject: [PATCH] codesniff libs --- application/libraries/PrestudentLib.php | 12 +++---- .../libraries/PrestudentstatusCheckLib.php | 33 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/application/libraries/PrestudentLib.php b/application/libraries/PrestudentLib.php index 45d8acb8d..d8950ad43 100644 --- a/application/libraries/PrestudentLib.php +++ b/application/libraries/PrestudentLib.php @@ -644,8 +644,8 @@ class PrestudentLib return success(); } - public function setAufgenommener($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester){ - + public function setAufgenommener($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester) + { $resultLastStatus = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id); if (isError($resultLastStatus)) return $resultLastStatus; @@ -677,8 +677,8 @@ class PrestudentLib return success(); } - public function setAbgewiesener($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester, $statusgrund_id){ - + public function setAbgewiesener($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester, $statusgrund_id) + { $resultLastStatus = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id); if (isError($resultLastStatus)) return $resultLastStatus; @@ -710,8 +710,8 @@ class PrestudentLib return success(); } - public function setWartender($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester){ - + public function setWartender($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester) + { $resultLastStatus = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id); if (isError($resultLastStatus)) return $resultLastStatus; diff --git a/application/libraries/PrestudentstatusCheckLib.php b/application/libraries/PrestudentstatusCheckLib.php index 27bbc4194..56739e567 100644 --- a/application/libraries/PrestudentstatusCheckLib.php +++ b/application/libraries/PrestudentstatusCheckLib.php @@ -175,14 +175,14 @@ class PrestudentstatusCheckLib * @return booleans $zgv_code, error if not registered */ //TODO(Manu) TEST - public function checkIfZGVEingetragenMaster($prestudent, $typ=null) + public function checkIfZGVEingetragenMaster($prestudent, $typ = null) { $this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); $result = $this->_ci->StudiengangModel->load($prestudent->studiengang_kz); if (isError($result)) return $result; if (!hasData($result)) - return error($this->_ci->p->t('studierendenantrag','error_no_stg', ['studiengang_kz' => $prestudent->studiengang_kz])); // TODO(chris): phrase + return error($this->_ci->p->t('studierendenantrag', 'error_no_stg', ['studiengang_kz' => $prestudent->studiengang_kz])); // TODO(chris): phrase if (current($result->retval)->typ != 'm') return success(true); // TODO(chris): correct? @@ -194,7 +194,7 @@ class PrestudentstatusCheckLib * Checks if a bewerber status already exists. * * @param integer $prestudent_id - * + * * @return stdClass */ public function checkIfExistingBewerberstatus($prestudent_id) @@ -213,8 +213,8 @@ class PrestudentstatusCheckLib * Checks if status aufgenommen already exists. * * @param integer $prestudent_id - * - * @return stdClass + * + * @return stdClass */ public function checkIfExistingAufgenommenerstatus($prestudent_id) { @@ -782,7 +782,7 @@ class PrestudentstatusCheckLib && $new_status_ausbildungssemester == $old_status_ausbildungssemester) { // ...neuen status an selber stelle einfügen wie zu ändernder Status - $resultArr[$status_to_change_index] = (object) array_merge((array) $resultArr[$status_to_change_index], (array) $neuer_status); + $resultArr[$status_to_change_index] = (object)array_merge((array)$resultArr[$status_to_change_index], (array)$neuer_status); $newStatusInserted = true; } else @@ -894,18 +894,18 @@ class PrestudentstatusCheckLib // wenn erster Studentstatus, checken ob Orgform des Bewerbers mit Studenten übereinstimmt if (!isEmptyArray( - array_filter( - $restliche_status_obj, - function ($s) use ($ersterStudent) { - return - $s->status_kurzbz == self::BEWERBER_STATUS - && ( - $s->studienplan_orgform_kurzbz != $ersterStudent->studienplan_orgform_kurzbz - ); - } - ) + array_filter( + $restliche_status_obj, + function ($s) use ($ersterStudent) { + return + $s->status_kurzbz == self::BEWERBER_STATUS + && ( + $s->studienplan_orgform_kurzbz != $ersterStudent->studienplan_orgform_kurzbz + ); + } ) ) + ) { return error($studentName . ' ' . $this->_ci->p->t('lehre', 'error_bewerberOrgformUngleichStudentOrgform')); } @@ -913,5 +913,4 @@ class PrestudentstatusCheckLib return $resultPs; } - }