Generate the code.

@return string
489256
public function generate()
    {
        $code = array();

        if ($this->namespace !== null) {
            $code[] = $this->getIndentation() . 'namespace ' . $this->namespace;
            $code[] = '{';
            $code[] = null;

            // Temporarily add one more level of indentation.
            $this->addIndentationLevel(1);
        }

        $doc = $this->generateDocumentation();
        if ($doc !== null) {
            $code[] = $doc;
        }

        $code[] = $this->generateSignature();
        $code[] = $this->getIndentation() . $this->generateBody();

        if ($this->namespace !== null) {
            // Set back the indentation.
            $this->addIndentationLevel(-1);

            $code[] = $this->getIndentation() . '}';
        }

        return implode($this->getLineFeed(), $code);
    }
859985
public function generate(): string
    {
        // The tag name is required
        if ($this->getTag() === '') {
            return '';
        }

        // Generate the attribute string
        $tagAttributes = $this->generateTagAttributes();

        // When attributes are provided, add a space between the tag and the attributes
        $tagSeparator = '';
        if ($tagAttributes !== '') {
            $tagSeparator = ' ';
        }

        // Create the opening tag
        $openingTag = sprintf(
            '<%s%s%s>',
            $this->getTag(),
            $tagSeparator,
            $tagAttributes
        );

        // Create the closing tag
        $closingTag = '';
        if (! in_array($this->getTag(), self::SELF_CLOSING_TAGS)) {
            $closingTag = sprintf('</%s>', $this->getTag());
        }

        // Collect the tag information
        return $openingTag . $this->getText() . $closingTag;
    }
82474
protected function buildGlobalCode() {
        $result = '';
        foreach ($this->events as $event) {
            $result .= $this->buildGlobalCodeOfEvent($event);
        }
        return $result;
    }
416402
public function generate()
	{
		if (TL_MODE == 'FE' && !BE_USER_LOGGED_IN && ($this->invisible || ($this->start > 0 && $this->start > time()) || ($this->stop > 0 && $this->stop < time())))
		{
			return '';
		}

		if ($this->arrData['space'][0] != '')
		{
			$this->arrStyle[] = 'margin-top:'.$this->arrData['space'][0].'px;';
		}

		if ($this->arrData['space'][1] != '')
		{
			$this->arrStyle[] = 'margin-bottom:'.$this->arrData['space'][1].'px;';
		}

		$this->Template = new \FrontendTemplate($this->strTemplate);
		$this->Template->setData($this->arrData);

		$this->compile();

		$this->Template->style = !empty($this->arrStyle) ? implode(' ', $this->arrStyle) : '';
		$this->Template->class = trim('ce_' . $this->type . ' ' . $this->cssID[1]);
		$this->Template->cssID = ($this->cssID[0] != '') ? ' id="' . $this->cssID[0] . '"' : '';

		$this->Template->inColumn = $this->strColumn;

		if ($this->Template->headline == '')
		{
			$this->Template->headline = $this->headline;
		}

		if ($this->Template->hl == '')
		{
			$this->Template->hl = $this->hl;
		}

		return $this->Template->parse();
	}
863863
public function generate()
    {
        $options = $this->options;

        $arguments = array_merge([$this->binary], (array) $this->arguments);
        $script    = implode(' ', array_map([ProcessUtils::class, 'escapeArgument'], $arguments));
        $process   = new Process(
            $this->applyForceToBackground($script),
            $this->workingDirectory,
            $this->getEnvironmentVariables(),
            $this->input,
            $this->timeout,
            $options
        );

        if ($this->outputDisabled) {
            $process->disableOutput();
        }

        return $process;
    }
19048
protected function generateVerifyCode()
	{
		if($this->minLength > $this->maxLength)
			$this->maxLength = $this->minLength;
		if($this->minLength < 3)
			$this->minLength = 3;
		if($this->maxLength > 20)
			$this->maxLength = 20;
		$length = mt_rand($this->minLength,$this->maxLength);

		$letters = 'bcdfghjklmnpqrstvwxyz';
		$vowels = 'aeiou';
		$code = '';
		for($i = 0; $i < $length; ++$i)
		{
			if($i % 2 && mt_rand(0,10) > 2 || !($i % 2) && mt_rand(0,10) > 9)
				$code.=$vowels[mt_rand(0,4)];
			else
				$code.=$letters[mt_rand(0,20)];
		}

		return $code;
	}
1100874
protected function buildInlineCode() {
        $result = '';
        if (!$this->events->isEmpty()) {
            $variableName = $this->getTimersVariableName();

            $result = 'foreach (Time => Name in ' . $variableName . ') {' . PHP_EOL
                . '    if (Time <= CurrentTime) {' . PHP_EOL
                . '        switch (Name) {' . PHP_EOL;

            foreach ($this->events as $event) {
                /* @var $event \ManiaScript\Builder\Event\Timer */
                $result .= '            case "' . $event->getName() . '": {' . PHP_EOL;
                if ($event->getInline()) {
                    $result .= $event->getCode() . PHP_EOL;
                } else {
                    $result .= '                ' . $this->buildHandlerFunctionCall($event) . PHP_EOL;
                }
                $result .= '            }' . PHP_EOL;
            }

            $result .= '        }' . PHP_EOL
                . '        declare Temp = ' . $variableName . '.removekey(Time);' . PHP_EOL
                . '    }' . PHP_EOL
                . '}' . PHP_EOL;
        }
        return $result;
    }
395907
protected function buildGlobalCode() {
        $result = '';
        foreach ($this->events as $event) {
            /* @var $event \ManiaScript\Builder\Event\AbstractEvent */
            if (!$event->getInline()) {
                $result .= $this->buildHandlerFunction($event);
            }
        }
        return $result;
    }
296238
function createCode()
  {
    $this->code = false;

    if ($this->use_wordlist && is_readable($this->wordlist_file)) {
      $this->code = $this->readCodeFromFile();
    }

    if ($this->code == false) {
      $this->code = $this->generateCode($this->code_length);
    }

    $this->saveData();
  }
268604
public function generate()
    {
        $code = array();

        $doc = $this->generateDocumentation();
        if ($doc !== null) {
            $code[] = $doc;
        }

        $code[] = $this->getIndentation() . 'const ' . $this->name . ' = ' . $this->value->generate() . ';';

        return implode($this->getLineFeed(), $code);
    }
1272290
public function generate(): string
    {
        $namespace = $this->reflectionClass->getNamespaceName();
        $fileDirectory = \rtrim($this->directory, '/') . '/Proxy/' . \str_replace('\\', '/', $namespace);
        $fileName = $this->reflectionClass->getShortName() . 'Proxy.php';
        $filePath = $fileDirectory . '/' . $fileName;

        if (!\is_dir($fileDirectory)) {
            // Try create directory
            if (false === @\mkdir($fileDirectory, 0777, true)) {
                throw new \RuntimeException(sprintf(
                    'Could not create directory "%s" for proxy file. Maybe not rights?',
                    $fileDirectory
                ));
            }
        } else if (!\is_writable($fileDirectory)) {
            throw new \RuntimeException(sprintf(
                'Cannot write to "%s" directory for save proxy file.',
                $fileDirectory
            ));
        }

        // Create file
        if (false === @\touch($filePath)) {
            throw new \RuntimeException(sprintf(
                'Could not create file "%s" for proxy class. Maybe not rights?',
                $filePath
            ));
        }

        \file_put_contents($filePath, $this->codeGenerator->generate());

        return $filePath;
    }
326165
public function generate()
    {
        $str     = '';
        $keysize = strlen($this->_alphabet);

        for ($i = 0; $i < $this->_length; ++$i) {
            $str .= $this->_alphabet[\Sodium\randombytes_uniform($keysize)];
        }

        return $str;
    }
397140
public function generate()
    {
        $result = '';

        $table  = $this->buildTable();
        $fields = $this->buildFields();
        $where  = $this->buildWhere();

        $result.='UPDATE '.$table.' SET '.$fields;

        if ($where != '') {
            $result.=' '.$where;
        }

        return $result;
    }
598275
public function generate()
    {
        $code = array();

        $doc = $this->generateDocumentation();
        if ($doc !== null) {
            $code[] = $doc;
        }

        if ($this->isAbstract() === true) {
            $code[] = $this->generateSignature() . ';';
        } else {
            $code[] = $this->generateSignature();
            $code[] = $this->getIndentation() . $this->generateBody();
        }

        return implode($this->getLineFeed(), $code);
    }
412846
public function generate()
    {
        return trim(
            '@' . $this->getAccess() . ' ' . $this->getType() . ' $' . $this->getPropertyName() . ' ' . $this->description
        );
    }
743489
public function getCode()
    {
        $html = $this->form;

        if ($this->meta->checks['honeypots'])
        {
            $html = $this->createHoneypots($html, $this->honeypots);
        }

        $botoborData =
            '<div style="display: none;">' .
            $this->createInput('hidden', Botobor::META_FIELD_NAME, $this->meta->getEncoded()) .
            '</div>';

        $html = preg_replace('/(<form[^>]*>)/si', '$1'.$botoborData, $html);

        return $html;
    }
112004
protected function generateConstantsLines()
    {
        $code = array();
        foreach ($this->constants as $constant) {
            $constant->setIndentationString($this->getIndentationString());
            $constant->setIndentationLevel($this->getIndentationLevel() + 1);
            $code[] = $constant->generate();
            $code[] = null;
        }

        return $code;
    }