always use brackets on if statements

This adds bracket around all one-line if statements that did
not have them yet.
This commit is contained in:
Sarah Hoffmann
2021-07-10 14:59:38 +02:00
parent 500c61685b
commit 27af9b102c
26 changed files with 377 additions and 144 deletions

View File

@@ -45,7 +45,9 @@ function getSettingConfig($sConfName, $sSystemConfig)
function fail($sError, $sUserError = false)
{
if (!$sUserError) $sUserError = $sError;
if (!$sUserError) {
$sUserError = $sError;
}
error_log('ERROR: '.$sError);
var_dump($sUserError);
echo "\n";
@@ -96,8 +98,9 @@ function getDatabaseDate(&$oDB)
function byImportance($a, $b)
{
if ($a['importance'] != $b['importance'])
if ($a['importance'] != $b['importance']) {
return ($a['importance'] > $b['importance']?-1:1);
}
return $a['foundorder'] <=> $b['foundorder'];
}