us ic_null (because I do what I want)

This commit is contained in:
Jean-Christian Denis 2023-04-20 15:00:40 +02:00
parent 89ad37727b
commit 5ffa8525a1
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
3 changed files with 4 additions and 4 deletions

View file

@ -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);
}
}

View file

@ -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)) {

View file

@ -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');
}