|
8 | 8 | use Sabre\VObject\InvalidDataException; |
9 | 9 | use Sabre\VObject\ParseException; |
10 | 10 | use Sabre\VObject\PHPUnitAssertions; |
| 11 | +use Sabre\VObject\Property; |
11 | 12 | use Sabre\VObject\Reader; |
12 | 13 | use Sabre\VObject\Recur\MaxInstancesExceededException; |
13 | 14 | use Sabre\VObject\Recur\NoInstancesException; |
@@ -85,10 +86,17 @@ public function process(string $input, ?string $old = null, ?string $expected = |
85 | 86 | $message->sequence = isset($vcal->VEVENT[0]) ? $vcal->VEVENT[0]->SEQUENCE->getValue() : null; |
86 | 87 |
|
87 | 88 | if ('REPLY' === $message->method) { |
88 | | - $message->sender = $mainComponent->ATTENDEE->getValue(); |
89 | | - $message->senderName = isset($mainComponent->ATTENDEE['CN']) ? $mainComponent->ATTENDEE['CN']->getValue() : null; |
90 | | - $message->recipient = $mainComponent->ORGANIZER->getValue(); |
91 | | - $message->recipientName = isset($mainComponent->ORGANIZER['CN']) ? $mainComponent->ORGANIZER['CN'] : null; |
| 89 | + /** |
| 90 | + * @var Property<int, mixed> $attendee |
| 91 | + */ |
| 92 | + $attendee = $mainComponent->ATTENDEE; |
| 93 | + $message->sender = $attendee->getValue(); |
| 94 | + /* @phpstan-ignore-next-line Offset 'CN' in isset() does not exist. Call to an undefined method getValue(). */ |
| 95 | + $message->senderName = isset($attendee['CN']) ? $attendee['CN']->getValue() : null; |
| 96 | + $organizer = $mainComponent->ORGANIZER; |
| 97 | + $message->recipient = $organizer->getValue(); |
| 98 | + /* @phpstan-ignore-next-line Offset 'CN' in isset() does not exist. */ |
| 99 | + $message->recipientName = isset($organizer['CN']) ? $organizer['CN'] : null; |
92 | 100 | } |
93 | 101 |
|
94 | 102 | $broker = new Broker(); |
|
0 commit comments