Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php
public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
    {
        $condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition);
        $returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue);
        $returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse);

        return ($condition) ? $returnIfTrue : $returnIfFalse;
    }
public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
    {
        $condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition);
        $returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue);
        $returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse);

        return ($condition) ? $returnIfTrue : $returnIfFalse;
    }
public static function statementIf ( $ condition = true , $ returnIfTrue = 0 , $ returnIfFalse = false ) { $ condition = ( $ condition === null ) ? true : ( bool ) Functions :: flattenSingleValue ( $ condition ) ; $ returnIfTrue = ( $ returnIfTrue === null ) ? 0 : Functions :: flattenSingleValue ( $ returnIfTrue ) ; $ returnIfFalse = ( $ returnIfFalse === null ) ? false : Functions :: flattenSingleValue ( $ returnIfFalse ) ; return ( $ condition ) ? $ returnIfTrue : $ returnIfFalse ; }
STATEMENT_IF.

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

Excel Function:
=IF(condition[,returnIfTrue[,returnIfFalse]])

Condition is any value or expression that can be evaluated to TRUE or FALSE.
For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100,
the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.
This argument can use any comparison calculation operator.
ReturnIfTrue is the value that is returned if condition evaluates to TRUE.
For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE,
then the IF function returns the text "Within budget"
If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use
the logical value TRUE for this argument.
ReturnIfTrue can be another formula.
ReturnIfFalse is the value that is returned if condition evaluates to FALSE.
For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE,
then the IF function returns the text "Over budget".
If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned.
If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
ReturnIfFalse can be another formula.

@category Logical Functions

@param mixed $condition Condition to evaluate
@param mixed $returnIfTrue Value to return when condition is true
@param mixed $returnIfFalse Optional value to return when condition is false

@return mixed The value of returnIfTrue or returnIfFalse determined by condition
STATEMENT_IF .