| Conditions | 3 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 28 | 6 | public function __construct(ContainerInterface $ci, Handler $handler) |
|
| 29 | { |
||
| 30 | 6 | $this->secret = $ci->get('settings')['secret']; |
|
| 31 | |||
| 32 | $this->router['pipeline'] = function (array $event) use($handler) { |
||
| 33 | 1 | foreach ($event['builds'] as $build) { |
|
| 34 | 1 | if ($build['stage'] === 'deploy') { |
|
| 35 | 1 | $handler->handleDeploy($event, $build); |
|
| 36 | 1 | } |
|
| 37 | 1 | } |
|
| 38 | 1 | }; |
|
| 39 | |||
| 40 | $this->router['push'] = function (array $event) use($handler) { |
||
| 41 | 1 | $handler->handlePush($event); |
|
| 42 | 1 | }; |
|
| 43 | |||
| 44 | 1 | $this->router['tag_push'] = function (array $event) use($handler) { |
|
| 45 | 1 | $handler->handleTag($event); |
|
| 46 | 1 | }; |
|
| 47 | 6 | } |
|
| 48 | |||
| 77 |