Crontab\Variable::setName PHP Method

setName() public method

public setName ( string $name ) : Variable
$name string
return Variable
    public function setName($name)
    {
        if (strpos($name, ' ') !== false) {
            throw new \InvalidArgumentException("Variable names cannot contain spaces");
        } else {
            if (strpos($name, '$') !== false) {
                throw new \InvalidArgumentException("Variable names cannot contain a '\$' character");
            }
        }
        $this->name = $name;
        return $this;
    }