| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PostTransactionEvent extends Event |
||
| 8 | { |
||
| 9 | /** @var \Psr\Http\Message\ResponseInterface|null */ |
||
| 10 | protected $response; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | protected $serviceName; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param \Psr\Http\Message\ResponseInterface|null $response |
||
| 17 | * @param string $serviceName |
||
| 18 | */ |
||
| 19 | public function __construct(?ResponseInterface $response, string $serviceName) |
||
| 20 | { |
||
| 21 | $this->response = $response; |
||
| 22 | $this->serviceName = $serviceName; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the transaction from the event. |
||
| 27 | * |
||
| 28 | * This returns the transaction we are working with. |
||
| 29 | * |
||
| 30 | * @return \Psr\Http\Message\ResponseInterface|null |
||
| 31 | */ |
||
| 32 | public function getTransaction() : ?ResponseInterface |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Sets the transaction inline with the event. |
||
| 39 | * |
||
| 40 | * @param \Psr\Http\Message\ResponseInterface|null $response |
||
| 41 | * |
||
| 42 | * @return void |
||
| 43 | */ |
||
| 44 | public function setTransaction(?ResponseInterface $response) : void |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getServiceName() : string |
||
| 55 | } |
||
| 56 | } |
||
| 57 |