1 | <?php |
||
20 | class TopCommand |
||
21 | { |
||
22 | /** |
||
23 | * Command to run in order to return git tags |
||
24 | * |
||
25 | * @var null|Command |
||
26 | */ |
||
27 | protected $command = null; |
||
28 | |||
29 | 3 | public function __construct() |
|
33 | |||
34 | /** |
||
35 | * Run configured command |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 1 | public function run() |
|
52 | |||
53 | /** |
||
54 | * Parse top utility command output |
||
55 | * |
||
56 | * Returns an array of lines with the same top columns |
||
57 | * |
||
58 | * @param $output |
||
59 | * @return array |
||
60 | */ |
||
61 | protected function parse($output) |
||
75 | |||
76 | /** |
||
77 | * Build commit command |
||
78 | * |
||
79 | * @return Command |
||
80 | * @throws \Tivie\Command\Exception\Exception |
||
81 | * @throws \Tivie\Command\Exception\InvalidArgumentException |
||
82 | */ |
||
83 | 3 | protected function buildCommand() |
|
93 | |||
94 | /** |
||
95 | * @return null|Command |
||
96 | */ |
||
97 | protected function getCommand() |
||
101 | } |