protected function checkIntOrNullValue(string $name, $value)
    {
        if (
            $value !== null &&
            !is_numeric($value) &&
            !($value instanceof \Closure) &&
            !($value instanceof self) &&
            !($value instanceof StatementInterface)
        ) {
            return $this->handleException(InvalidArgumentException::create(
                $name,
                $value,
                ['integer', \Closure::class, self::class, StatementInterface::class, 'null']
            ));
        }

        if (is_numeric($value)) {
            $value = (int)$value;
        } elseif ($value instanceof \Closure) {
            return $this->resolveSubQueryClosure($value);
        }

        return $value;
    }
protected function checkIntOrNullValue(string $name, $value)
    {
        if (
            $value !== null &&
            !is_numeric($value) &&
            !($value instanceof \Closure) &&
            !($value instanceof self) &&
            !($value instanceof StatementInterface)
        ) {
            return $this->handleException(InvalidArgumentException::create(
                $name,
                $value,
                ['integer', \Closure::class, self::class, StatementInterface::class, 'null']
            ));
        }

        if (is_numeric($value)) {
            $value = (int)$value;
        } elseif ($value instanceof \Closure) {
            return $this->resolveSubQueryClosure($value);
        }

        return $value;
    }
protected function checkIntOrNullValue ( string $ name , $ value ) { if ( $ value !== null && ! is_numeric ( $ value ) && ! ( $ value instanceof \ Closure ) && ! ( $ value instanceof self ) && ! ( $ value instanceof StatementInterface ) ) { return $ this -> handleException ( InvalidArgumentException :: create ( $ name , $ value , [ 'integer' , \ Closure :: class , self :: class , StatementInterface :: class , 'null' ] ) ) ; } if ( is_numeric ( $ value ) ) { $ value = ( int ) $ value ; } elseif ( $ value instanceof \ Closure ) { return $ this -> resolveSubQueryClosure ( $ value ) ; } return $ value ; }
Check that value is suitable for being a "int or null or subquery" property of a query. Retrieves the closure
subquery.

@param string $name Value name
@param int|\Closure|self|StatementInterface|null $value
@return int|self|StatementInterface|null
@throws InvalidArgumentException
@throws InvalidReturnValueException
Check that value is suitable for being a int or null or subquery property of a query . Retrieves the closure subquery .