| Total Complexity | 5 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class MessageBuilder |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $body; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $properties = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $headers = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return static |
||
| 32 | */ |
||
| 33 | public static function create() |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $body |
||
| 40 | * |
||
| 41 | * @return $this |
||
| 42 | */ |
||
| 43 | public function body(string $body) |
||
| 44 | { |
||
| 45 | $this->body = $body; |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param array $properties |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | public function properties(array $properties) |
||
| 56 | { |
||
| 57 | $this->properties = $properties; |
||
| 58 | |||
| 59 | return $this; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param array $headers |
||
| 64 | * |
||
| 65 | * @return $this |
||
| 66 | */ |
||
| 67 | public function headers(array $headers) |
||
| 68 | { |
||
| 69 | $this->headers = $headers; |
||
| 70 | |||
| 71 | return $this; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return AmqpMessage |
||
| 76 | */ |
||
| 77 | public function build(): AmqpMessage |
||
| 86 | } |
||
| 87 | |||
| 88 | } |
||
| 89 |