Conditions | 2 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
34 | public function boot() |
||
35 | { |
||
36 | $dotEnv = \Dotenv\Dotenv::create(__DIR__ . '../..'); |
||
37 | $dotEnv->safeLoad(); |
||
38 | $dotEnv->required(['GITLAB_TOKEN'])->notEmpty(); |
||
39 | |||
40 | /** @var Container $container */ |
||
41 | $container = $this->getContainer(); |
||
42 | |||
43 | $container->add('SLACK_WEBHOOK_URL', getenv('SLACK_WEBHOOK_URL')); |
||
44 | $container->add('SLACK_CHANNEL', getenv('SLACK_CHANNEL')); |
||
45 | $container->add('GITLAB_TOKEN', getenv('GITLAB_TOKEN')); |
||
46 | $container->add('GITLAB_URL', (getenv('GITLAB_URL') ? getenv('GITLAB_URL') : 'https://gitlab.com')); |
||
47 | } |
||
49 |