| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class OpenAPIDocCreatedEvent extends DocEvent |
||
| 11 | { |
||
| 12 | const EVENT_NAME = 'json_rpc_http_server_openapi_doc.array_created'; |
||
| 13 | |||
| 14 | /** @var array */ |
||
| 15 | private $openAPIDoc; |
||
| 16 | /** @var HttpServerDoc */ |
||
| 17 | private $serverDoc; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array $openAPIDoc |
||
| 21 | * @param HttpServerDoc $serverDoc |
||
| 22 | */ |
||
| 23 | 2 | public function __construct(array $openAPIDoc, HttpServerDoc $serverDoc) |
|
| 24 | { |
||
| 25 | |||
| 26 | 2 | $this->openAPIDoc = $openAPIDoc; |
|
| 27 | 2 | $this->serverDoc = $serverDoc; |
|
| 28 | 2 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return array |
||
| 32 | */ |
||
| 33 | 2 | public function getOpenAPIDoc() : array |
|
| 34 | { |
||
| 35 | 2 | return $this->openAPIDoc; |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return HttpServerDoc |
||
| 40 | */ |
||
| 41 | 1 | public function getServerDoc() : HttpServerDoc |
|
| 42 | { |
||
| 43 | 1 | return $this->serverDoc; |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param array $openAPIDoc |
||
| 48 | * |
||
| 49 | * @return OpenAPIDocCreatedEvent |
||
| 50 | */ |
||
| 51 | 1 | public function setOpenAPIDoc(array $openAPIDoc) : OpenAPIDocCreatedEvent |
|
| 56 | } |
||
| 57 | } |
||
| 58 |