@@ 18-38 (lines=21) @@ | ||
15 | * |
|
16 | * @codingStandardsIgnoreFile |
|
17 | */ |
|
18 | class CommitMsg extends Application |
|
19 | { |
|
20 | /** |
|
21 | * @var AppKernel |
|
22 | */ |
|
23 | private $container; |
|
24 | ||
25 | public function __construct() |
|
26 | { |
|
27 | $appKernel = new AppKernel('dev', true); |
|
28 | $appKernel->boot(); |
|
29 | $this->container = $appKernel->getContainer(); |
|
30 | parent::__construct('commit-msg'); |
|
31 | } |
|
32 | ||
33 | public function doRun(InputInterface $input, OutputInterface $output) |
|
34 | { |
|
35 | $this->container->get('bruli.command.bus') |
|
36 | ->handle(new CommitMsgCommand($input)); |
|
37 | } |
|
38 | } |
|
39 |
@@ 19-45 (lines=27) @@ | ||
16 | * |
|
17 | * @codingStandardsIgnoreFile |
|
18 | */ |
|
19 | class PreCommit extends Application |
|
20 | { |
|
21 | /** |
|
22 | * @var AppKernel |
|
23 | */ |
|
24 | private $container; |
|
25 | ||
26 | /** |
|
27 | * PreCommit constructor. |
|
28 | */ |
|
29 | public function __construct() |
|
30 | { |
|
31 | $appKernel = new AppKernel('dev', true); |
|
32 | $appKernel->boot(); |
|
33 | $this->container = $appKernel->getContainer(); |
|
34 | parent::__construct('pre-commit'); |
|
35 | } |
|
36 | ||
37 | public function doRun(InputInterface $input, OutputInterface $output) |
|
38 | { |
|
39 | /** |
|
40 | * @var PreCommitToolCommandHandler |
|
41 | */ |
|
42 | $command = $this->container->get('bruli.command.bus'); |
|
43 | $command->handle(new PreCommitToolCommand()); |
|
44 | } |
|
45 | } |
|
46 |