From 89c6496c39e54e613f9ad3e7916108ce1db093e5 Mon Sep 17 00:00:00 2001 From: Micha Ober Date: Sat, 4 Nov 2023 13:44:48 +0100 Subject: [PATCH] Simplify boolean expressions --- notification_service.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notification_service.php b/notification_service.php index 9c2c7d1..232299a 100644 --- a/notification_service.php +++ b/notification_service.php @@ -290,20 +290,20 @@ public function force_send_discord_notification($discord_webhook_url, $message) */ private function execute_discord_webhook($discord_webhook_url, $color, $message, $title = null, $preview = null, $footer = null) { - if (isset($discord_webhook_url) == false || $discord_webhook_url === '') + if (!isset($discord_webhook_url) || $discord_webhook_url === '') { return false; } - if (is_integer($color) == false || $color < 0) + if (!is_integer($color) || $color < 0) { // Use the default color if we did not receive a valid color value $color = self::DEFAULT_COLOR; } - if (is_string($message) == false || $message == '') + if (!is_string($message) || $message == '') { return false; } - if (isset($footer) == true && (is_string($footer) == false || $footer == '')) + if (isset($footer) && (!is_string($footer) || $footer == '')) { return false; }