Generates the options part of the command

@param TaskDescriptionInterface $description
@return string
184785
private function generateOptions(TaskDescriptionInterface $description)
    {
        $cmdPart = '';
        $options = $description->getOptions();
        if (!is_array($options)) {
            return $cmdPart;
        }
        foreach ($options as $optionName => $optionValue) {
            //validate the option name
            if (!$this->isValidOptionName($optionName)) {
                continue;
            }
            if (is_bool($optionValue) && $optionValue) {
                $cmdPart .= ' --' . $optionName;
            } elseif (is_string($optionValue)|| is_integer($optionValue)) {
                $cmdPart .= ' --' . $optionName . '=' . escapeshellarg($optionValue);
            }
        }
        return $cmdPart;

    }
64028
protected void generateIMemberBuilder(MemberDescription description) {
		if (description.isTopElement()) {
			return;
		}
		final TypeReference builder = description.getElementDescription().getBuilderInterfaceType();
		final StringConcatenationClient content = new StringConcatenationClient() {
			@Override
			protected void appendTo(TargetStringConcatenation it) {
				it.append("/** Builder of a " + getLanguageName() //$NON-NLS-1$
						+ " " + description.getElementDescription().getName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
				it.newLine();
				it.append(" */"); //$NON-NLS-1$
				it.newLine();
				it.append("@SuppressWarnings(\"all\")"); //$NON-NLS-1$
				it.newLine();
				it.append("public interface "); //$NON-NLS-1$
				it.append(builder.getSimpleName());
				it.append(" {"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
				it.append(generateMembers(description, true, false));
				it.append("}"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
			}
		};
		final JavaFileAccess javaFile = getFileAccessFactory().createJavaFile(builder, content);
		javaFile.writeTo(getSrcGen());
	}
1155697
protected function setDescription($description = null)
    {
        if ($description) {
            $description = strip_tags($description);
        }

        $this->description = $description;

        return $this;
    }
336660
public function setDescription($description = null) {

        if ( empty($description) ) $this->description = null;

        else if ( !is_string($description) ) throw new InvalidArgumentException("Invalid RpcMethod description");

        else $this->description = $description;

        return $this;

    }
499259
private function getCoordinates(Description $description)
    {
        $latitude  = $description->getOptionalProperty('lat');
        $longitude = $description->getOptionalProperty('lng');

        if ($latitude === null || $longitude === null) {
            return null;
        }

        return new Coordinates($latitude, $longitude);
    }
1183809
public function getByDescription($description)
    {
        if (\is_scalar($description) && ! empty($description = Str::lower(trim((string) $description)))) {
            foreach ($this->items as $repair_method) {
                if (Str::lower($repair_method->getDescription()) === $description) {
                    return $repair_method;
                }
            }
        }
    }
634625
public function getHelpDescription(): string
    {
        $inputDefinition = $this->inputDefinition;
        $output = new BufferedOutput();

        $name = $this->getFullCommand();

        $command = (new Command($name))
            ->setDefinition($inputDefinition)
            ->setDescription($this->getDescription());

        $descriptor = new DescriptorHelper();
        $descriptor->describe($output, $command);

        return $output->fetch();
    }
1209198
public function setDefaultDescription($description = null)
    {
        if (! $this->description) {
            $description = $description ?: config("fields.descriptions.{$this->key}", ucfirst($this->key));
            foreach ((array) $description as $locale => $translation) {
                $locale = is_string($locale) ? $locale : $this->getDefaultLocale();
                $this->setTranslation('description', $translation, $locale);
            }
        }
    }
1271763
private function listComponents(string $interface, string $title, string $description): ResponseInterface
    {
        $uses_access  = in_array($interface, self::COMPONENTS_WITH_ACCESS, true);
        $uses_sorting = in_array($interface, self::COMPONENTS_WITH_SORT, true);

        return $this->viewResponse('admin/components', [
            'description'  => $description,
            'interface'    => $interface,
            'modules'      => $this->module_service->findByInterface($interface, true, true),
            'title'        => $title,
            'trees'        => Tree::all(),
            'uses_access'  => $uses_access,
            'uses_sorting' => $uses_sorting,
        ]);
    }
503873
private function resolveElement(DescriptorAbstract $element, $link, ?string $description = null): string
    {
        $rule = $this->router->match($element);

        if ($rule) {
            $url = '..' . $rule->generate($element);
            $link = $this->generateMarkdownLink($url, $description ?: (string) $link);
        }

        return $link;
    }
1220006
private function transformDescriptionLines(array $descriptionLines)
    {
        $description = '';

        foreach ($descriptionLines as $line) {
            $description .= $this->transformString($line);
        }

        return $description;
    }
1098933
public function setShortDescription($description)
    {
        $description = trim($description);
        if ($description === '') {
            $this->shortDescription = null;
        } else {
            $this->shortDescription = $description;
        }

        return $this;
    }
962850
public static function panel($title, $description)
    {
        $argCount = func_num_args();
        $args = func_get_args();

        $sections = array();
        for ($i = 2; $i < $argCount; ++$i) {
            $sections[$args[$i]['id']] = $args[$i];
        }

        return array(
            'title'       => $title,
            'description' => $description,
            'sections'    => $sections
        );
    }
1071798
public function task($name, $task = null, $description = null)
    {
        return $this->add($task, $name, $description)->getTask();
    }
507802
protected function getCommandDescriptions()
    {
        $descriptions = [];
        foreach ($this->getCommands() as $command) {
            $description = '';

            $result = $this->app->createController($command);
            if ($result !== false && $result[0] instanceof Controller) {
                [$controller, $actionID] = $result;
                /** @var Controller $controller */
                $description = $controller->getHelpSummary();
            }

            $descriptions[$command] = $description;
        }

        return $descriptions;
    }
534781
protected function _getCommand($name, $task, $list)
	{
		Behavior::framework();

		$message = \Lang::txt('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');
		$message = addslashes($message);

		return $message;
	}
1193706
public function addOption($description, $option = null)
    {
        if ($option) {
            $this->options[$option] = $description;
        } else {
            $this->options[] = $description;
        }

        return $this;
    }