Use type-specific comparisons over empty

This commit is contained in:
Joshua Ramon Enslin 2020-08-27 16:15:54 +02:00 committed by Stefan Rohde-Enslin
parent 37383c3b1e
commit 237db1c58a

View File

@ -79,7 +79,7 @@ class MDErrorReporter {
final private function _formulateDebugMailSection(string $headline, array $toFormat, int $level = 0):string {
$msg = "";
if (!empty($headline)) {
if ($headline !== "") {
if ($level === 0) {
$msg .= PHP_EOL . "## " . $headline;
$msg .= PHP_EOL . "----------------------" . PHP_EOL . PHP_EOL;
@ -147,7 +147,7 @@ class MDErrorReporter {
=========================
";
if (!empty($contextInfo)) {
if ($contextInfo !== []) {
$msg .= $this->_formulateDebugMailSection("Context information", $contextInfo);
}