JBBCode/CodeDefinitionBuilder.php
public function setNestLimit($limit)
    {
        if (!is_int($limit) || ($limit <= 0 && -1 != $limit)) {
            throw new \InvalidArgumentException("A nest limit must be a positive integer " .
                                               "or -1.");
        }
        $this->nestLimit = $limit;
        return $this;
    }
public function setNestLimit($limit)
    {
        if (!is_int($limit) || ($limit <= 0 && -1 != $limit)) {
            throw new \InvalidArgumentException("A nest limit must be a positive integer " .
                                               "or -1.");
        }
        $this->nestLimit = $limit;
        return $this;
    }
public function setNestLimit ( $ limit ) { if ( ! is_int ( $ limit ) || ( $ limit <= 0 && - 1 != $ limit ) ) { throw new \ InvalidArgumentException ( "A nest limit must be a positive integer " . "or -1." ) ; } $ this -> nestLimit = $ limit ; return $ this ; }
Sets the nest limit for this code definition.

@param integer $limit a positive integer, or -1 if there is no limit.
@throws \InvalidArgumentException  if the nest limit is invalid
@return self
Sets the nest limit for this code definition .