Skip to content

Commit

Permalink
Use Shell::columns() instead of rolling our own method
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Aug 10, 2014
1 parent c3a01e7 commit 8adcd50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli/table/Ascii.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
namespace cli\table;

use cli\Colors;
use cli\Shell;

/**
* The ASCII renderer renders tables with ASCII borders.
Expand All @@ -35,7 +36,7 @@ class Ascii extends Renderer {
public function setWidths(array $widths) {

if ( is_null( $this->_constraintWidth ) ) {
$this->_constraintWidth = (int) shell_exec( 'tput cols' );
$this->_constraintWidth = (int) Shell::columns();
}
$col_count = count( $widths );
$col_borders_count = $col_count * strlen( $this->_characters['border'] );
Expand Down

0 comments on commit 8adcd50

Please sign in to comment.