| Total Complexity | 7 |
| Total Lines | 97 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class End extends Event |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Queue |
||
| 19 | */ |
||
| 20 | private $queue; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Context |
||
| 24 | */ |
||
| 25 | private $context; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var float |
||
| 29 | */ |
||
| 30 | private $startTime; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var float |
||
| 34 | */ |
||
| 35 | private $endTime; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var integer |
||
| 39 | */ |
||
| 40 | private $exitStatus; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public static function name(): string |
||
| 46 | { |
||
| 47 | return 'consumer.event.end'; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Constructor. |
||
| 52 | * |
||
| 53 | * @param Queue $queue |
||
| 54 | * @param Context $context |
||
| 55 | * @param float $startTime |
||
| 56 | * @param float $endTime |
||
| 57 | * @param int|null $exitStatus |
||
| 58 | */ |
||
| 59 | public function __construct( |
||
| 60 | Queue $queue, |
||
| 61 | Context $context, |
||
| 62 | float $startTime, |
||
| 63 | float $endTime, |
||
| 64 | ?int $exitStatus = null |
||
| 65 | ) { |
||
| 66 | $this->queue = $queue; |
||
| 67 | $this->context = $context; |
||
| 68 | $this->startTime = $startTime; |
||
| 69 | $this->endTime = $endTime; |
||
| 70 | $this->exitStatus = $exitStatus; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return Queue |
||
| 75 | */ |
||
| 76 | public function queue(): Queue |
||
| 77 | { |
||
| 78 | return $this->queue; |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return Context |
||
| 83 | */ |
||
| 84 | public function context(): Context |
||
| 85 | { |
||
| 86 | return $this->context; |
||
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @return float |
||
| 91 | */ |
||
| 92 | public function startTime(): float |
||
| 93 | { |
||
| 94 | return $this->startTime; |
||
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return float |
||
| 99 | */ |
||
| 100 | public function endTime(): float |
||
| 101 | { |
||
| 102 | return $this->endTime; |
||
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return int|null |
||
| 107 | */ |
||
| 108 | public function getExitStatus(): ?int |
||
| 111 | } |
||
| 112 | |||
| 113 | } |
||
| 114 |