Set custom stubs overwriting the default ones.

@param array $stubs Same format as in the stubs.php file.
@param bool $reset If default ones should be resetted/removed.
@return $this
334721
public function setHosts(array $stubs, $reset = false) {
		if ($reset) {
			$this->_hosts = [];
		}
		foreach ($stubs as $stub) {
			$slug = $this->_slug($stub['name']);
			$this->_hosts[$slug] = $stub;
		}
		return $this;
	}
721097
protected function replaceClassName(&$stub)
    {
        $className = ucwords(camel_case($this->argumentName()));

        $stub = str_replace('{{class}}', $className, $stub);

        return $this;
    }
565300
public function setResetParams($resetParams)
        {
            $this->_resetParams = (bool) $resetParams;
            $this->_hrefCache   = null;

            return $this;
        }
1240401
public function setServices(Array $services) {
    $this->services = array();
    foreach ($services as $service) {
      $this->addService($service);
    }
    return $this;
  }
662927
public function setDefaults(array $defaults): self
    {
        foreach ((array)$defaults as $key => $value) {
            if (isset($this->defaults[$key])) {
                $this->defaults[$key] = $value;
            } else {
                throw new Exception('Invalid route default', Exception::HTTP_INTERNAL_SERVER_ERROR);
            }
        }

        return $this;
    }
1011601
protected function replaceEndpoint(string &$stub, string $endpoint)
    {

        if (strlen($endpoint) > 0)
            $stub = str_replace('/dummy/endpoint/', $endpoint, $stub);

        return $this;
    }
1285948
public function setOptions(array $options = [], $reset = false)
    {
        return $this->setDigits(current($options) ? (int) current($options) : 2)
                ->setSeparator(next($options) ? current($options) : ',')
                ->setThousands(next($options) ? current($options) : ' ')
                ->setTrimZeros(next($options) ? (bool) current($options) : false)
                ->setTrimLeaveZeros(next($options) ? current($options) : 2);
    }
1059834
public function reset($default = true)
    {
        foreach ($this->_data as $state) {
            $state->value = $default ? $state->default : null;
        }

        return $this;
    }
438404
protected function replaceSoftDelete(&$stub, $replaceSoftDelete)
    {
        if ($replaceSoftDelete == 'yes') {
            $stub = str_replace('{{softDeletes}}', "use SoftDeletes;\n    ", $stub);
            $stub = str_replace('{{useSoftDeletes}}', "use Illuminate\Database\Eloquent\SoftDeletes;\n", $stub);
        } else {
            $stub = str_replace('{{softDeletes}}', '', $stub);
            $stub = str_replace('{{useSoftDeletes}}', '', $stub);
        }

        return $this;
    }
1222176
protected function replaceSoftDeletes(&$stub, $softDeletes)
    {
        $import = $use = '';

        if ($softDeletes) {
            $import = "use Illuminate\\Database\\Eloquent\\SoftDeletes;\n";
            $use = "use SoftDeletes;\n";
        }

        $stub = str_replace(['DummyImportSoftDeletesTrait', 'DummyUseSoftDeletesTrait'], [$import, $use], $stub);

        return $this;
    }
1332252
protected function replaceStandardLabels(&$stub, array $items)
    {
        foreach ($items as $labels) {
            foreach ($labels as $label) {
                $text = $label->isPlain ? sprintf("'%s'", $label->text) : sprintf("trans('%s')", $label->localeGroup);
                $stub = $this->strReplace($label->template, $text, $stub);
            }
        }

        return $this;
    }
1076551
public function setChanges($changes)
    {
        if ($changes instanceof Records) {
            $this->changes = $changes;
        } else {
            if (is_array($changes)) {
                $changes       = new Records($changes);
                $this->changes = $changes;
            }
        }
        return $this;
    }
352626
public function with(...$arguments): Stub
    {
        $this->closeRule();

        if (empty($this->rules)) {
            $defaultAnswerCallback = $this->defaultAnswerCallback;
            $defaultAnswerCallback($this);
            $this->closeRule();
        }

        $this->criteria = $this->matcherFactory->adaptAll($arguments);

        return $this;
    }
347612
protected function replaceSchema(&$stub)
    {
        $tables = array_merge(
            $this->getSortedSingularTableNames(),
            $this->getSortedTableNames()
        );

        $stub = str_replace(
            ['{{columnOne}}', '{{columnTwo}}', '{{tableOne}}', '{{tableTwo}}'],
            $tables,
            $stub
        );

        return $this;
    }
717799
public function setQuickReplies(array $quickReplies): self
    {
        $this->isValidQuickReplies($quickReplies);

        $this->quickReplies = $quickReplies;

        return $this;
    }
1299335
public static function setdefaults(&$arr, $defaults) {
    foreach($defaults as $key => $value) {
      self::setdefault($arr, $key, $value);
    }
  }
773742
protected function replaceClassName(&$stub)
    {
        $className = ucwords(camel_case($this->argument('name')));

        $stub = str_replace('{{class}}', $className, $stub);

        return $this;
    }