aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Modulteil.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
commita1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch)
tree2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/Modulteil.php
parent244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff)
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/Modulteil.php')
-rw-r--r--lib/models/Modulteil.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/models/Modulteil.php b/lib/models/Modulteil.php
index 14a34ba..d6c935c 100644
--- a/lib/models/Modulteil.php
+++ b/lib/models/Modulteil.php
@@ -102,7 +102,8 @@ class Modulteil extends ModuleManagementModelTreeItem
*/
public static function findByModul($modul_id)
{
- return parent::getEnrichedByQuery('
+ return parent::getEnrichedByQuery(
+ '
SELECT mmt.*,
COUNT(lvgruppe_id) AS count_lvgruppen
FROM mvv_modulteil AS mmt
@@ -122,7 +123,8 @@ class Modulteil extends ModuleManagementModelTreeItem
*/
public static function findByLvgruppe($lvgruppe_id)
{
- return parent::getEnrichedByQuery('
+ return parent::getEnrichedByQuery(
+ '
SELECT mmt.*
FROM mvv_modulteil mmt
LEFT JOIN mvv_lvgruppe_modulteil mlm USING(modulteil_id)
@@ -132,13 +134,14 @@ class Modulteil extends ModuleManagementModelTreeItem
);
}
- public function getDisplayName($options = self::DISPLAY_DEFAULT) {
+ public function getDisplayName($options = self::DISPLAY_DEFAULT)
+ {
$name = '';
if ($this->num_bezeichnung) {
$name .= $GLOBALS['MVV_MODULTEIL']['NUM_BEZEICHNUNG']['values'][$this->num_bezeichnung]['name'];
$name .= !is_null($this->nummer) ? ' ' . $this->nummer : '';
$name .= ': ';
- } else if ($this->nummer) {
+ } elseif ($this->nummer) {
$name .= $this->nummer . ': ';
}
$name .= $GLOBALS['MVV_MODULTEIL']['LERNLEHRFORM']['values'][$this->lernlehrform]['name'] ?? '';
@@ -171,7 +174,8 @@ class Modulteil extends ModuleManagementModelTreeItem
* @param bool If true returns always a new descriptor
* @return object The Deskriptor.
*/
- public function getDeskriptor($language = null, $force_new = false) {
+ public function getDeskriptor($language = null, $force_new = false)
+ {
if (!isset($GLOBALS['MVV_MODULTEIL_DESKRIPTOR']['SPRACHE']['values'][$language])) {
$language = $this->default_language;
}
@@ -297,7 +301,8 @@ class Modulteil extends ModuleManagementModelTreeItem
}
$this->languages = SimpleORMapCollection::createFromArray(
- $assigned_languages);
+ $assigned_languages
+ );
}
/**