-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommander.php
More file actions
40 lines (33 loc) · 888 Bytes
/
Commander.php
File metadata and controls
40 lines (33 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
namespace Syntatis\Version\CLI;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Syntatis\Version\CLI\Commands\EqualCommand;
use Syntatis\Version\CLI\Commands\GreaterThanCommand;
use Syntatis\Version\CLI\Commands\IncrementCommand;
use Syntatis\Version\CLI\Commands\LessThanCommand;
use Syntatis\Version\CLI\Commands\ValidateCommand;
final class Commander extends Application
{
public const VERSION = '0.2.0';
public function __construct()
{
parent::__construct('Version', self::VERSION);
$this->addCommands($this->getCommands());
}
/**
* @return array<Command>
* @phpstan-return list<Command>
*/
private function getCommands(): array
{
return [
new EqualCommand(),
new GreaterThanCommand(),
new IncrementCommand(),
new LessThanCommand(),
new ValidateCommand(),
];
}
}