Closed fritzmg closed 7 years ago
You can further simplify the code.
Current:
$connected = ($connection !== false);
if ($connected) {
fclose($connection);
return true;
}
return false;
Simplified:
if ($connection !== false) {
fclose($connection);
return true;
}
return false;
There is no need to define a variable $connected
which is only used once.
True, done.
See https://github.com/contao/check/pull/107#issuecomment-290184167
I have simply moved
fclose
to the already existingif ($connected)
.