src/Internal/CoOption.php
private static function validateBool($key, $value)
    {
        $value = filter_var($value, FILTER_VALIDATE_BOOLEAN, [
            'flags' => FILTER_NULL_ON_FAILURE,
        ]);
        if ($value === null) {
            throw new \InvalidArgumentException("Option[$key] must be boolean.");
        }
        return $value;
    }
private static function validateBool($key, $value)
    {
        $value = filter_var($value, FILTER_VALIDATE_BOOLEAN, [
            'flags' => FILTER_NULL_ON_FAILURE,
        ]);
        if ($value === null) {
            throw new \InvalidArgumentException("Option[$key] must be boolean.");
        }
        return $value;
    }
private static function validateBool ( $ key , $ value ) { $ value = filter_var ( $ value , FILTER_VALIDATE_BOOLEAN , [ 'flags' => FILTER_NULL_ON_FAILURE , ] ) ; if ( $ value === null ) { throw new \ InvalidArgumentException ( "Option[$key] must be boolean." ) ; } return $ value ; }
Validate bool value.
@param  string $key
@param  mixed  $value
@throws InvalidArgumentException
@return bool
Validate bool value .