Version 1
[yaffs-website] / vendor / consolidation / annotated-command / tests / src / ApplicationWithTerminalWidth.php
1 <?php
2 namespace Consolidation\TestUtils;
3
4 use Symfony\Component\Console\Application;
5
6 class ApplicationWithTerminalWidth extends Application
7 {
8     protected $width = 0;
9     protected $height = 0;
10
11     public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
12     {
13         parent::__construct($name, $version);
14     }
15
16     public function setWidthAndHeight($width, $height)
17     {
18         $this->width = $width;
19         $this->height = $height;
20     }
21
22     public function getTerminalDimensions()
23     {
24         return [ $this->width, $this->height ];
25     }
26 }