protected function getDimensionsFromTput() : ?array
    {
        if (empty($output = $this->execute('tput cols && tput lines'))) {
            return null;
        }

        // tput will have returned the values on separate lines, so let's just explode.
        $output = explode("\n", $output);

        return [
            'width' => (int) $output[0],
            'height'=> (int) $output[1]
        ];
    }
protected function getDimensionsFromTput() : ?array
    {
        if (empty($output = $this->execute('tput cols && tput lines'))) {
            return null;
        }

        // tput will have returned the values on separate lines, so let's just explode.
        $output = explode("\n", $output);

        return [
            'width' => (int) $output[0],
            'height'=> (int) $output[1]
        ];
    }
protected function getDimensionsFromTput ( ) : ? array { if ( empty ( $ output = $ this -> execute ( 'tput cols && tput lines' ) ) ) { return null ; } // tput will have returned the values on separate lines, so let's just explode. $ output = explode ( "\n" , $ output ) ; return [ 'width' => ( int ) $ output [ 0 ] , 'height' => ( int ) $ output [ 1 ] ] ; }
Executes a combined 'tput' call and parses the results in order to determine the dimensions of the terminal.

@return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
be parsed to retrieve anything useful.
Executes a combined tput call and parses the results in order to determine the dimensions of the terminal .