src/Charcoal/Source/Expression.php
public function setCondition($condition)
    {
        if ($condition === null) {
            $this->condition = $condition;
            return $this;
        }

        if (!is_string($condition)) {
            throw new InvalidArgumentException(
                'Custom expression must be a string.'
            );
        }

        $condition = trim($condition);
        if ($condition === '') {
            $condition = null;
        }

        $this->condition = $condition;
        return $this;
    }
public function setCondition($condition)
    {
        if ($condition === null) {
            $this->condition = $condition;
            return $this;
        }

        if (!is_string($condition)) {
            throw new InvalidArgumentException(
                'Custom expression must be a string.'
            );
        }

        $condition = trim($condition);
        if ($condition === '') {
            $condition = null;
        }

        $this->condition = $condition;
        return $this;
    }
public function setCondition ( $ condition ) { if ( $ condition === null ) { $ this -> condition = $ condition ; return $ this ; } if ( ! is_string ( $ condition ) ) { throw new InvalidArgumentException ( 'Custom expression must be a string.' ) ; } $ condition = trim ( $ condition ) ; if ( $ condition === '' ) { $ condition = null ; } $ this -> condition = $ condition ; return $ this ; }
Set the custom query expression.

@param  string|null $condition The custom query expression.
@throws InvalidArgumentException If the parameter is not a valid string expression.
@return self
Set the custom query expression .