From 8adcd506b315efcb14dac767077d149430afb1f8 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sun, 10 Aug 2014 12:48:13 -0700 Subject: [PATCH] Use `Shell::columns()` instead of rolling our own method --- lib/cli/table/Ascii.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli/table/Ascii.php b/lib/cli/table/Ascii.php index e9bea96..2270a5d 100644 --- a/lib/cli/table/Ascii.php +++ b/lib/cli/table/Ascii.php @@ -13,6 +13,7 @@ namespace cli\table; use cli\Colors; +use cli\Shell; /** * The ASCII renderer renders tables with ASCII borders. @@ -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'] );