diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
| commit | a1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch) | |
| tree | 2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/Semester.class.php | |
| parent | 244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff) | |
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/Semester.class.php')
| -rw-r--r-- | lib/models/Semester.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/models/Semester.class.php b/lib/models/Semester.class.php index 1a490a6..874b379 100644 --- a/lib/models/Semester.class.php +++ b/lib/models/Semester.class.php @@ -40,7 +40,7 @@ class Semester extends SimpleORMap $config['additional_fields']['last_sem_week']['get'] = 'getLastSemesterWeek'; $config['additional_fields']['current']['get'] = 'isCurrent'; $config['additional_fields']['past']['get'] = 'isPast'; - $config['additional_fields']['short_name']['get'] = function($semester) { + $config['additional_fields']['short_name']['get'] = function ($semester) { return (string) $semester->semester_token ?: (string) $semester->name; }; @@ -153,7 +153,7 @@ class Semester extends SimpleORMap public static function findAllVisible($with_before_first = true): array { return array_values( - array_filter(self::getAllAsArray(), function ($semester, $key) use($with_before_first) { + array_filter(self::getAllAsArray(), function ($semester, $key) use ($with_before_first) { return $GLOBALS['perm']->have_perm('admin') || !empty($semester['visible']) || ((int)$key === 0 && $with_before_first); }, ARRAY_FILTER_USE_BOTH) ); @@ -264,8 +264,7 @@ class Semester extends SimpleORMap $option_value = 'semester_id', $include_all = true, $use_semester_id = true - ) - { + ) { $select_attributes = array_merge([ 'name' => 'sem_select', ], $select_attributes ?? []); @@ -392,7 +391,8 @@ class Semester extends SimpleORMap $start_weeks[$i] = sprintf( _('%u. Semesterwoche (ab %s)'), $i + 1, - strftime('%x', $timestamp)); + strftime('%x', $timestamp) + ); $i += 1; |
