Merge pull request #23814 from civicrm/5.51
[civicrm-core.git] / Civi / Api4 / Query / SqlFunctionISNULL.php
index 538ad322860d84b27034e69c409300ee0ae0bb9a..17d729d430d675fbf879207006086c343ba1e2be 100644 (file)
@@ -18,12 +18,15 @@ class SqlFunctionISNULL extends SqlFunction {
 
   protected static $category = self::CATEGORY_COMPARISON;
 
-  protected static $params = [
-    [
-      'expr' => 1,
-      'optional' => FALSE,
-    ],
-  ];
+  protected static $dataType = 'Boolean';
+
+  protected static function params(): array {
+    return [
+      [
+        'optional' => FALSE,
+      ],
+    ];
+  }
 
   /**
    * @return string
@@ -32,4 +35,11 @@ class SqlFunctionISNULL extends SqlFunction {
     return ts('Is null');
   }
 
+  /**
+   * @return string
+   */
+  public static function getDescription(): string {
+    return ts('TRUE if the value is NULL, otherwise FALSE.');
+  }
+
 }