library/Garp/Cli/Ui/ProgressBar.php
protected function _detectNumberOfTerminalColumns() {
        $terminalCols = null;
        try {
            exec('tput cols 2> /dev/null', $terminalCols, $errorCode);

            if ($errorCode == 0 && $terminalCols && array_key_exists(0, $terminalCols)) {
                return (int)$terminalCols[0];
            }
        } catch (Exception $e) {
        }

        return self::DEFAULT_SCREEN_SIZE;
    }
protected function _detectNumberOfTerminalColumns() {
        $terminalCols = null;
        try {
            exec('tput cols 2> /dev/null', $terminalCols, $errorCode);

            if ($errorCode == 0 && $terminalCols && array_key_exists(0, $terminalCols)) {
                return (int)$terminalCols[0];
            }
        } catch (Exception $e) {
        }

        return self::DEFAULT_SCREEN_SIZE;
    }
protected function _detectNumberOfTerminalColumns ( ) { $ terminalCols = null ; try { exec ( 'tput cols 2> /dev/null' , $ terminalCols , $ errorCode ) ; if ( $ errorCode == 0 && $ terminalCols && array_key_exists ( 0 , $ terminalCols ) ) { return ( int ) $ terminalCols [ 0 ] ; } } catch ( Exception $ e ) { } return self :: DEFAULT_SCREEN_SIZE ; }
Returns the number of columns in the current terminal screen.

@return int Number of available colums
Returns the number of columns in the current terminal screen .