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