| Conditions | 5 |
| Paths | 16 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function build(): self |
||
| 36 | { |
||
| 37 | $this->payloadPart = []; |
||
| 38 | |||
| 39 | if (!empty($this->payload->getTitle())) { |
||
| 40 | $this->payloadPart['title'] = (string) $this->payload->getTitle(); |
||
| 41 | } |
||
| 42 | |||
| 43 | if (!empty($this->payload->getBody())) { |
||
| 44 | $this->payloadPart['body'] = (string) $this->payload->getBody(); |
||
| 45 | } |
||
| 46 | |||
| 47 | if (!empty($this->payload->getIcon())) { |
||
| 48 | $this->payloadPart['icon'] = (string) $this->payload->getIcon(); |
||
| 49 | } |
||
| 50 | |||
| 51 | if (!empty($this->payload->getClickAction())) { |
||
| 52 | $this->payloadPart['click_action'] = (string) $this->payload->getClickAction(); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $this; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..