X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FApi4%2FQuery%2FSqlFunctionISNULL.php;h=17d729d430d675fbf879207006086c343ba1e2be;hb=5f53b4ee45ed335284cd1edb979b11e45871e560;hp=7b614a53811148e891ea27440111fc2ccc4b3fec;hpb=ff6487df2439aff898b77086be2dcda1ea408f3e;p=civicrm-core.git diff --git a/Civi/Api4/Query/SqlFunctionISNULL.php b/Civi/Api4/Query/SqlFunctionISNULL.php index 7b614a5381..17d729d430 100644 --- a/Civi/Api4/Query/SqlFunctionISNULL.php +++ b/Civi/Api4/Query/SqlFunctionISNULL.php @@ -18,11 +18,15 @@ class SqlFunctionISNULL extends SqlFunction { protected static $category = self::CATEGORY_COMPARISON; - protected static $params = [ - [ - 'optional' => FALSE, - ], - ]; + protected static $dataType = 'Boolean'; + + protected static function params(): array { + return [ + [ + 'optional' => FALSE, + ], + ]; + } /** * @return string @@ -32,17 +36,10 @@ class SqlFunctionISNULL extends SqlFunction { } /** - * Reformat result as boolean - * - * @see \Civi\Api4\Utils\FormattingUtil::formatOutputValues - * @param string $value - * @param string $dataType - * @return string|array + * @return string */ - public function formatOutputValue($value, &$dataType) { - // Value is always TRUE or FALSE - $dataType = 'Boolean'; - return $value; + public static function getDescription(): string { + return ts('TRUE if the value is NULL, otherwise FALSE.'); } }