PHP_CodeSniffer_CLI::_validateReportWidth PHP Method

_validateReportWidth() private method

Set report width based on terminal width.
private _validateReportWidth ( integer $width ) : integer
$width integer The width of the report. If "auto" then will be replaced by the terminal width.
return integer
    private function _validateReportWidth($width)
    {
        if ($width === 'auto' && preg_match('|\\d+ (\\d+)|', shell_exec('stty size 2>&1'), $matches) === 1) {
            return (int) $matches[1];
        }
        return (int) $width;
    }