| Total Complexity | 7 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 73.68% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class BoltApp extends App |
||
| 16 | { |
||
| 17 | const SETTER_INJECTOR = SetterInjector::class; |
||
| 18 | /** |
||
| 19 | * @var ?EventsHub |
||
| 20 | */ |
||
| 21 | protected $eventsHub; |
||
| 22 | /** |
||
| 23 | * @var ?RequestContext |
||
| 24 | */ |
||
| 25 | protected $requestContext; |
||
| 26 | |||
| 27 | 2 | public function injectEventsHub(?EventsHub $eventsHub) |
|
| 28 | { |
||
| 29 | 2 | $this->eventsHub = $eventsHub; |
|
| 30 | 2 | return $this; |
|
| 31 | } |
||
| 32 | |||
| 33 | 2 | public function injectRequestContext(?RequestContext $requestContext) |
|
| 34 | { |
||
| 35 | 2 | $this->requestContext = $requestContext; |
|
| 36 | 2 | return $this; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return EventsHub |
||
| 41 | */ |
||
| 42 | public function getEventsHub(): EventsHub |
||
| 43 | { |
||
| 44 | assert($this->eventsHub !== null); |
||
| 45 | return $this->eventsHub; |
||
| 46 | } |
||
| 47 | |||
| 48 | 2 | protected function main(): ResponseInterface |
|
| 63 | } |
||
| 64 | } |
||
| 65 | } |
||
| 66 |