Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Help.php

function Help::__construct

Same name in this branch
  1. 11.1.x vendor/phpunit/phpunit/src/TextUI/Help.php \PHPUnit\TextUI\Help::__construct()

Constructor.

Parameters

\PHP_CodeSniffer\Config $config Configuration object.:

array<string> $longOptions The long options which should be shown.:

string $shortOptions The short options which should be shown.:

Throws

\InvalidArgumentException When $shortOptions is not a string.

File

vendor/squizlabs/php_codesniffer/src/Util/Help.php, line 118

Class

Help

Namespace

PHP_CodeSniffer\Util

Code

public function __construct(Config $config, array $longOptions, $shortOptions = '') {
    if (is_string($shortOptions) === false) {
        throw new InvalidArgumentException('The $shortOptions parameter must be a string');
    }
    $this->config = $config;
    $this->requestedOptions = array_merge($longOptions, str_split($shortOptions));
    $this->filterOptions();
    $this->indentWidth = strlen(self::INDENT);
    $this->gutterWidth = strlen(self::GUTTER);
    $this->setMaxOptionNameLength();
}
RSS feed
Powered by Drupal