| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 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|null */ |
||
| 17 | private $serverDoc; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array $openAPIDoc |
||
| 21 | * @param HttpServerDoc|null $serverDoc |
||
| 22 | */ |
||
| 23 | public function __construct( |
||
| 24 | array $openAPIDoc, |
||
| 25 | HttpServerDoc $serverDoc = null |
||
| 26 | ) { |
||
| 27 | |||
| 28 | $this->openAPIDoc = $openAPIDoc; |
||
| 29 | $this->serverDoc = $serverDoc; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return HttpServerDoc |
||
| 34 | */ |
||
| 35 | public function getOpenAPIDoc() |
||
| 36 | { |
||
| 37 | return $this->openAPIDoc; |
||
|
|
|||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return HttpServerDoc|null |
||
| 42 | */ |
||
| 43 | public function getServerDoc() |
||
| 44 | { |
||
| 45 | return $this->serverDoc; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param array $openAPIDoc |
||
| 50 | * |
||
| 51 | * @return OpenAPIDocCreatedEvent |
||
| 52 | */ |
||
| 53 | public function setOpenAPIDoc(array $openAPIDoc) |
||
| 58 | } |
||
| 59 | } |
||
| 60 |