From 5ffa8525a1606ff226616b3a57a2cb07b3a9192f Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 20 Apr 2023 15:00:40 +0200 Subject: [PATCH] us ic_null (because I do what I want) --- src/Action.php | 2 +- src/ActivityReport.php | 4 ++-- src/Settings.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Action.php b/src/Action.php index 5225f54..7a0a30c 100644 --- a/src/Action.php +++ b/src/Action.php @@ -38,7 +38,7 @@ class Action ?callable $function ) { // fake action has no behavior - if (null !== $function) { + if (!is_null($function)) { dcCore::app()->addBehavior($behavior, $function); } } diff --git a/src/ActivityReport.php b/src/ActivityReport.php index 030d062..a9a595e 100644 --- a/src/ActivityReport.php +++ b/src/ActivityReport.php @@ -104,7 +104,7 @@ class ActivityReport */ public function getLogs(ArrayObject $params = null, bool $count_only = false, ?SelectStatement $ext_sql = null): ?dcRecord { - if (null === $params) { + if (is_null($params)) { $params = new ArrayObject(); } @@ -598,7 +598,7 @@ class ActivityReport ]); $logs = $this->getLogs($params); - if ($logs !== null && !$logs->isEmpty()) { + if (!is_null($logs) && !$logs->isEmpty()) { // Datas to readable text $content = $this->parseLogs($logs); if (!empty($content)) { diff --git a/src/Settings.php b/src/Settings.php index 21136e5..e8620f4 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -51,7 +51,7 @@ class Settings */ public function __construct() { - if (dcCore::app()->blog === null) { + if (is_null(dcCore::app()->blog)) { throw new Exception('Blog is not set'); }