-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.php
More file actions
41 lines (31 loc) · 1017 Bytes
/
Copy pathApplication.php
File metadata and controls
41 lines (31 loc) · 1017 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
41
<?php
/*
* (c) Christian Gripp <mail@core23.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nucleos\Relazy;
use Nucleos\Relazy\Command\ChangesCommand;
use Nucleos\Relazy\Command\CurrentCommand;
use Nucleos\Relazy\Command\ReleaseCommand;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
final class Application extends BaseApplication
{
private const RELAZY_VERSION = '0.0.0';
public function __construct()
{
parent::__construct('relazy - The lazy release tool', self::RELAZY_VERSION);
$this->add(new ReleaseCommand());
$this->add(new CurrentCommand());
$this->add(new ChangesCommand());
}
public function add(Command $command): Command
{
$command = parent::add($command);
\assert(null !== $command);
$command->setApplication($this);
return $command;
}
}