| Total Complexity | 5 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class MethodDocCreatedEvent extends DocEvent |
||
| 11 | { |
||
| 12 | const EVENT_NAME = 'json_rpc_http_server_doc.method_doc_created'; |
||
| 13 | |||
| 14 | /** @var MethodDoc */ |
||
| 15 | private $doc; |
||
| 16 | /** @var JsonRpcMethodInterface|null */ |
||
| 17 | private $method; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param MethodDoc $doc |
||
| 21 | */ |
||
| 22 | 6 | public function __construct(MethodDoc $doc) |
|
| 23 | { |
||
| 24 | 6 | $this->doc = $doc; |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return MethodDoc |
||
| 29 | */ |
||
| 30 | 5 | public function getDoc() : MethodDoc |
|
| 31 | { |
||
| 32 | 5 | return $this->doc; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return null|JsonRpcMethodInterface |
||
| 37 | */ |
||
| 38 | 3 | public function getMethod() : ?JsonRpcMethodInterface |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param JsonRpcMethodInterface $method |
||
| 45 | * |
||
| 46 | * @return MethodDocCreatedEvent |
||
| 47 | */ |
||
| 48 | 4 | public function setMethod(JsonRpcMethodInterface $method) : MethodDocCreatedEvent |
|
| 49 | { |
||
| 50 | 4 | $this->method = $method; |
|
| 51 | |||
| 52 | 4 | return $this; |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param MethodDoc $doc |
||
| 57 | * |
||
| 58 | * @return MethodDocCreatedEvent |
||
| 59 | */ |
||
| 60 | 1 | public function setDoc(MethodDoc $doc) : MethodDocCreatedEvent |
|
| 65 | } |
||
| 66 | } |
||
| 67 |