[Console] Make getTerminalWith & getTerminalHeight public
This commit is contained in:
parent
d8652785cf
commit
f299bd0968
@ -794,7 +794,7 @@ class Application
|
|||||||
*
|
*
|
||||||
* @return int|null
|
* @return int|null
|
||||||
*/
|
*/
|
||||||
protected function getTerminalWidth()
|
public function getTerminalWidth()
|
||||||
{
|
{
|
||||||
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
|
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
|
||||||
return preg_replace('{^(\d+)x.*$}', '$1', $ansicon);
|
return preg_replace('{^(\d+)x.*$}', '$1', $ansicon);
|
||||||
@ -810,7 +810,7 @@ class Application
|
|||||||
*
|
*
|
||||||
* @return int|null
|
* @return int|null
|
||||||
*/
|
*/
|
||||||
protected function getTerminalHeight()
|
public function getTerminalHeight()
|
||||||
{
|
{
|
||||||
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
|
if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
|
||||||
return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon));
|
return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon));
|
||||||
|
Reference in New Issue
Block a user