| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 3 | public function __construct($config = []) |
|
| 16 | { |
||
| 17 | 3 | $config = Collection::fromConfig($config, [], ['token']); |
|
| 18 | 3 | parent::__construct('', $config); |
|
| 19 | |||
| 20 | 3 | $description = ServiceDescription::factory(__DIR__.'/Resources/slack_api.json'); |
|
| 21 | 3 | $this->setDescription($description); |
|
| 22 | |||
| 23 | 3 | $this->getEventDispatcher()->addListener('command.before_prepare', function (Event $event) use ($config) { |
|
| 24 | 1 | $event['command']['token'] = $config['token']; |
|
| 25 | 3 | }); |
|
| 26 | 3 | } |
|
| 27 | |||
| 38 |