function Help::__construct
Same name in this branch
- 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
Namespace
PHP_CodeSniffer\UtilCode
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();
}