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

Breadcrumb

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

function BaseCommand::getTerminalWidth

Return value

int

2 calls to BaseCommand::getTerminalWidth()
SearchCommand::execute in vendor/composer/composer/src/Composer/Command/SearchCommand.php
Executes the current command.
ShowCommand::execute in vendor/composer/composer/src/Composer/Command/ShowCommand.php
Executes the current command.

File

vendor/composer/composer/src/Composer/Command/BaseCommand.php, line 437

Class

BaseCommand
Base class for Composer commands

Namespace

Composer\Command

Code

protected function getTerminalWidth() {
    $terminal = new Terminal();
    $width = $terminal->getWidth();
    if (Platform::isWindows()) {
        $width--;
    }
    else {
        $width = max(80, $width);
    }
    return $width;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal