diff options
author | Simon Rettberg | 2023-11-14 14:47:55 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-14 14:47:55 +0100 |
commit | 06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0 (patch) | |
tree | 7e5493b102074672d8cfd8fe1a61e49f080edbe8 /modules-available/exams/baseconfig/getconfig.inc.php | |
parent | Update phpstorm config (diff) | |
download | slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.gz slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.xz slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.zip |
Add function param/return types, fix a lot more phpstorm complaints
Diffstat (limited to 'modules-available/exams/baseconfig/getconfig.inc.php')
-rw-r--r-- | modules-available/exams/baseconfig/getconfig.inc.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules-available/exams/baseconfig/getconfig.inc.php b/modules-available/exams/baseconfig/getconfig.inc.php index 120bdbff..748149ad 100644 --- a/modules-available/exams/baseconfig/getconfig.inc.php +++ b/modules-available/exams/baseconfig/getconfig.inc.php @@ -1,14 +1,17 @@ <?php -$foofoo = function($machineUuid) { +/** @var ?string $uuid */ +/** @var ?string $ip */ + +if ($uuid !== null) { // Leave clients in any runmode alone $res = Database::queryFirst('SELECT machineuuid FROM runmode WHERE machineuuid = :uuid', - array('uuid' => $machineUuid), true); + array('uuid' => $uuid), true); if (is_array($res)) return; // Check if exam mode should apply $locations = ConfigHolder::get('SLX_LOCATIONS'); - if ($locations === false) { + if ($locations === null) { $locationIds = []; } else { $locationIds = explode(' ', $locations); @@ -26,6 +29,4 @@ $foofoo = function($machineUuid) { // No saver ConfigHolder::add('SLX_SCREEN_SAVER_TIMEOUT', '0', 1000); } -}; - -$foofoo($uuid);
\ No newline at end of file +}
\ No newline at end of file |