Passed
Push — master ( b915f6...d4e1c4 )
by
unknown
24:34 queued 09:28
created
class.meetingrequest.php 2 patches
Spacing   +38 added lines, -40 removed lines patch added patch discarded remove patch
@@ -160,15 +160,15 @@  discard block
 block discarded – undo
160 160
 		$properties['reminderminutes'] = 'PT_LONG:PSETID_Common:' . PidLidReminderDelta;
161 161
 		$properties['reminderset'] = 'PT_BOOLEAN:PSETID_Common:' . PidLidReminderSet;
162 162
 		$properties['sendasical'] = 'PT_BOOLEAN:PSETID_Appointment:0x8200';
163
-		$properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:' . PidLidAppointmentSequence;					// AppointmentSequenceNumber
163
+		$properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:' . PidLidAppointmentSequence; // AppointmentSequenceNumber
164 164
 		$properties['unknown7'] = 'PT_LONG:PSETID_Appointment:0x8202';
165
-		$properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203';			// AppointmentLastSequence
165
+		$properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence
166 166
 		$properties['busystatus'] = 'PT_LONG:PSETID_Appointment:' . PidLidBusyStatus;
167 167
 		$properties['intendedbusystatus'] = 'PT_LONG:PSETID_Appointment:' . PidLidIntendedBusyStatus;
168 168
 		$properties['start'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidAppointmentStartWhole;
169 169
 		$properties['responselocation'] = 'PT_STRING8:PSETID_Meeting:0x2';
170 170
 		$properties['location'] = 'PT_STRING8:PSETID_Appointment:' . PidLidLocation;
171
-		$properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229';		// PidLidFInvited, MeetingRequestWasSent
171
+		$properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent
172 172
 		$properties['startdate'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidAppointmentStartWhole;
173 173
 		$properties['duedate'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidAppointmentEndWhole;
174 174
 		$properties['flagdueby'] = 'PT_SYSTIME:PSETID_Common:' . PidLidReminderSignalTime;
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 		$properties['recurring'] = 'PT_BOOLEAN:PSETID_Appointment:' . PidLidRecurring;
178 178
 		$properties['clipstart'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidClipStart;
179 179
 		$properties['clipend'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidClipEnd;
180
-		$properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD';				// StartRecurTime
181
-		$properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE';				// StartRecurTime
182
-		$properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF';				// EndRecurDate
183
-		$properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10';				// EndRecurTime
184
-		$properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA';				// LID_IS_EXCEPTION
180
+		$properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime
181
+		$properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime
182
+		$properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate
183
+		$properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime
184
+		$properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION
185 185
 		$properties['apptreplyname'] = 'PT_STRING8:PSETID_Appointment:0x8230';
186 186
 		// Propose new time properties
187 187
 		$properties['proposed_start_whole'] = 'PT_SYSTIME:PSETID_Appointment:' . PidLidAppointmentProposedStartWhole;
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 *
221 221
 	 * @return bool returns true if this is a meeting request else false
222 222
 	 */
223
-	public function isMeetingRequest(false|string $messageClass = false): bool {
223
+	public function isMeetingRequest(false | string $messageClass = false): bool {
224 224
 		if ($messageClass === false) {
225 225
 			$messageClass = mapi_getprops($this->message, [PR_MESSAGE_CLASS])[PR_MESSAGE_CLASS] ?? false;
226 226
 		}
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	 *
236 236
 	 * @return bool returns true if this is a meeting request else false
237 237
 	 */
238
-	public function isMeetingRequestResponse(false|string $messageClass = false): bool {
238
+	public function isMeetingRequestResponse(false | string $messageClass = false): bool {
239 239
 		if ($messageClass === false) {
240 240
 			$messageClass = mapi_getprops($this->message, [PR_MESSAGE_CLASS])[PR_MESSAGE_CLASS] ?? false;
241 241
 		}
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 *
251 251
 	 * @return bool returns true if this is a meeting request else false
252 252
 	 */
253
-	public function isMeetingCancellation(false|string $messageClass = false): bool {
253
+	public function isMeetingCancellation(false | string $messageClass = false): bool {
254 254
 		if ($messageClass === false) {
255 255
 			$messageClass = mapi_getprops($this->message, [PR_MESSAGE_CLASS])[PR_MESSAGE_CLASS] ?? false;
256 256
 		}
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 	 *
264 264
 	 * @return false|int false when last_updatecounter not found else return last_updatecounter
265 265
 	 */
266
-	public function getLastUpdateCounter(): false|int {
266
+	public function getLastUpdateCounter(): false | int {
267 267
 		$calendarItemProps = mapi_getprops($this->message, [$this->proptags['last_updatecounter']]);
268 268
 
269 269
 		return $calendarItemProps[$this->proptags['last_updatecounter']] ?? false;
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 		$listProperties['rcvd_representing_search_key'] = PR_RCVD_REPRESENTING_SEARCH_KEY;
534 534
 		$messageProps = mapi_getprops($this->message, $listProperties);
535 535
 
536
-		$goid = $messageProps[$this->proptags['goid']];	// GlobalID (0x3)
536
+		$goid = $messageProps[$this->proptags['goid']]; // GlobalID (0x3)
537 537
 		if (!isset($goid)) {
538 538
 			return;
539 539
 		}
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 	 *
610 610
 	 * @return bool|string $entryid entryid of item which created/updated in calendar
611 611
 	 */
612
-	public function doAccept(bool $tentative, bool $sendresponse, bool $move, mixed $newProposedStartTime = false, mixed $newProposedEndTime = false, mixed $body = false, mixed $userAction = false, mixed $store = false, mixed $basedate = false, bool $isImported = false): bool|string {
612
+	public function doAccept(bool $tentative, bool $sendresponse, bool $move, mixed $newProposedStartTime = false, mixed $newProposedEndTime = false, mixed $body = false, mixed $userAction = false, mixed $store = false, mixed $basedate = false, bool $isImported = false): bool | string {
613 613
 		if ($this->isLocalOrganiser()) {
614 614
 			return false;
615 615
 		}
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 	 * @FIXME cancellation mail is also sent to attendee which has declined the meeting
1261 1261
 	 * @FIXME don't send canellation mail when cancelling meeting from past
1262 1262
 	 */
1263
-	public function doCancelInvitation(false|int $basedate = false): void {
1263
+	public function doCancelInvitation(false | int $basedate = false): void {
1264 1264
 		if (!$this->isLocalOrganiser()) {
1265 1265
 			return;
1266 1266
 		}
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
 	 * is only used for new MeetingRequests. Pass the appointment item as $message
1338 1338
 	 * in the constructor to do this.
1339 1339
 	 */
1340
-	public function setMeetingRequest(false|int $basedate = false): void {
1340
+	public function setMeetingRequest(false | int $basedate = false): void {
1341 1341
 		$props = mapi_getprops($this->message, [$this->proptags['updatecounter']]);
1342 1342
 
1343 1343
 		// Create a new global id for this item
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
 		$props[$this->proptags['goid2']] = $goid;
1374 1374
 
1375 1375
 		if (!isset($props[$this->proptags['updatecounter']])) {
1376
-			$props[$this->proptags['updatecounter']] = 0;			// OL also starts sequence no with zero.
1376
+			$props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero.
1377 1377
 			$props[$this->proptags['last_updatecounter']] = 0;
1378 1378
 		}
1379 1379
 
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
 	 *
1393 1393
 	 * @psalm-return array{error: 1|3|4, displayname: mixed}|true
1394 1394
 	 */
1395
-	public function sendMeetingRequest(mixed $cancel, mixed $prefix = false, mixed $basedate = false, mixed $modifiedRecips = false, mixed $deletedRecips = false): array|true {
1395
+	public function sendMeetingRequest(mixed $cancel, mixed $prefix = false, mixed $basedate = false, mixed $modifiedRecips = false, mixed $deletedRecips = false): array | true {
1396 1396
 		$this->includesResources = false;
1397 1397
 		$this->nonAcceptingResources = [];
1398 1398
 
@@ -1491,7 +1491,7 @@  discard block
 block discarded – undo
1491 1491
 	 * as it will automatically call setMeetingRequest on this object if it is the first
1492 1492
 	 * call to this function.
1493 1493
 	 */
1494
-	public function updateMeetingRequest(false|int $basedate = false): void {
1494
+	public function updateMeetingRequest(false | int $basedate = false): void {
1495 1495
 		$messageprops = mapi_getprops($this->message, [$this->proptags['last_updatecounter'], $this->proptags['goid']]);
1496 1496
 
1497 1497
 		if (!isset($messageprops[$this->proptags['goid']])) {
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
 
1522 1522
 		$calendarItem = $isMeetingMessage ?
1523 1523
 			$this->getCorrespondentCalendarItem(true) : // Meeting request/response/cancellation mail
1524
-			$this->message;  // Calendar item
1524
+			$this->message; // Calendar item
1525 1525
 
1526 1526
 		// Even if we have received request/response for exception/occurrence then also
1527 1527
 		// we can check recurring series for organizer, no need to check with exception/occurrence
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
 	 *
1605 1605
 	 * @return bool|string default calendar folder of store
1606 1606
 	 */
1607
-	public function getDefaultWastebasketEntryID(mixed $store = false): bool|string {
1607
+	public function getDefaultWastebasketEntryID(mixed $store = false): bool | string {
1608 1608
 		return $this->getBaseEntryID(PR_IPM_WASTEBASKET_ENTRYID, $store);
1609 1609
 	}
1610 1610
 
@@ -1615,7 +1615,7 @@  discard block
 block discarded – undo
1615 1615
 	 *
1616 1616
 	 * @return bool|string default sent mail folder of store
1617 1617
 	 */
1618
-	public function getDefaultSentmailEntryID(mixed $store = false): bool|string {
1618
+	public function getDefaultSentmailEntryID(mixed $store = false): bool | string {
1619 1619
 		return $this->getBaseEntryID(PR_IPM_SENTMAIL_ENTRYID, $store);
1620 1620
 	}
1621 1621
 
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
 	 *
1630 1630
 	 * @return bool|string entryid of folder pointed by $prop
1631 1631
 	 */
1632
-	public function getDefaultFolderEntryID(int $prop, mixed $store = false): bool|string {
1632
+	public function getDefaultFolderEntryID(int $prop, mixed $store = false): bool | string {
1633 1633
 		try {
1634 1634
 			$inbox = mapi_msgstore_getreceivefolder($store ?: $this->store);
1635 1635
 			$inboxprops = mapi_getprops($inbox, [$prop]);
@@ -1671,7 +1671,7 @@  discard block
 block discarded – undo
1671 1671
 	 *
1672 1672
 	 * @return bool|string entryid of default folder from store
1673 1673
 	 */
1674
-	public function getBaseEntryID(int $prop, mixed $store = false): bool|string {
1674
+	public function getBaseEntryID(int $prop, mixed $store = false): bool | string {
1675 1675
 		$storeprops = mapi_getprops($store ?: $this->store, [$prop]);
1676 1676
 
1677 1677
 		return $storeprops[$prop] ?? false;
@@ -2029,7 +2029,7 @@  discard block
 block discarded – undo
2029 2029
 	}
2030 2030
 
2031 2031
 	// Gets the SMTP address of the passed addressbook entryid
2032
-	public function getSMTPAddress(string $entryid): false|string {
2032
+	public function getSMTPAddress(string $entryid): false | string {
2033 2033
 		if (!$this->session) {
2034 2034
 			return false;
2035 2035
 		}
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
 	 *
2069 2069
 	 * @psalm-return false|list{mixed, mixed, mixed, mixed, mixed}
2070 2070
 	 */
2071
-	public function getOwnerAddress(mixed $store, bool $fallbackToLoggedInUser = true): array|false {
2071
+	public function getOwnerAddress(mixed $store, bool $fallbackToLoggedInUser = true): array | false {
2072 2072
 		if (!$this->session) {
2073 2073
 			return false;
2074 2074
 		}
@@ -2077,8 +2077,7 @@  discard block
 block discarded – undo
2077 2077
 
2078 2078
 		// Determine owner entry ID: use mailbox owner if not falling back, otherwise use user entry ID
2079 2079
 		$ownerEntryId = (!$fallbackToLoggedInUser && !empty($storeProps[PR_MAILBOX_OWNER_ENTRYID])) ?
2080
-			$storeProps[PR_MAILBOX_OWNER_ENTRYID] :
2081
-			($storeProps[PR_USER_ENTRYID] ?? false);
2080
+			$storeProps[PR_MAILBOX_OWNER_ENTRYID] : ($storeProps[PR_USER_ENTRYID] ?? false);
2082 2081
 
2083 2082
 		if (!$ownerEntryId) {
2084 2083
 			return false;
@@ -2184,7 +2183,7 @@  discard block
 block discarded – undo
2184 2183
 	 *
2185 2184
 	 * @return false|int true if basedate is found else false it not found
2186 2185
 	 */
2187
-	public function getBasedateFromGlobalID(string $goid): false|int {
2186
+	public function getBasedateFromGlobalID(string $goid): false | int {
2188 2187
 		$hexguid = bin2hex($goid);
2189 2188
 		$hexbase = substr($hexguid, 32, 8);
2190 2189
 		$day = (int) hexdec(substr($hexbase, 6, 2));
@@ -2203,7 +2202,7 @@  discard block
 block discarded – undo
2203 2202
 	 *
2204 2203
 	 * @return false|string globalID with basedate in it
2205 2204
 	 */
2206
-	public function setBasedateInGlobalID(string $goid, false|int $basedate = false, ?BaseRecurrence $recurrence = null): false|string {
2205
+	public function setBasedateInGlobalID(string $goid, false | int $basedate = false, ?BaseRecurrence $recurrence = null): false | string {
2207 2206
 		$hexguid = bin2hex($goid);
2208 2207
 		$timestamp = $basedate;
2209 2208
 
@@ -2350,7 +2349,7 @@  discard block
 block discarded – undo
2350 2349
 		$getResourcesRestriction = [
2351 2350
 			RES_PROPERTY,
2352 2351
 			[
2353
-				RELOP => RELOP_EQ,	// Equals recipient type 3: Resource
2352
+				RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2354 2353
 				ULPROPTAG => PR_RECIPIENT_TYPE,
2355 2354
 				VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2356 2355
 			],
@@ -2811,7 +2810,7 @@  discard block
 block discarded – undo
2811 2810
 				$restriction[1][] = [
2812 2811
 					RES_PROPERTY,
2813 2812
 					[
2814
-						RELOP => RELOP_NE,	// Does not equal recipient type: MAPI_BCC (Resource)
2813
+						RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
2815 2814
 						ULPROPTAG => PR_RECIPIENT_TYPE,
2816 2815
 						VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2817 2816
 					],
@@ -2912,7 +2911,7 @@  discard block
 block discarded – undo
2912 2911
 			$stripResourcesRestriction[1][] = [
2913 2912
 				RES_PROPERTY,
2914 2913
 				[
2915
-					RELOP => RELOP_NE,	// Does not equal recipient type: MAPI_BCC (Resource)
2914
+					RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
2916 2915
 					ULPROPTAG => PR_RECIPIENT_TYPE,
2917 2916
 					VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2918 2917
 				],
@@ -3016,7 +3015,7 @@  discard block
 block discarded – undo
3016 3015
 			$newmessageprops[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Canceled';
3017 3016
 			$newmessageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // It's a cancel request
3018 3017
 			$newmessageprops[$this->proptags['busystatus']] = fbFree; // set the busy status as free
3019
-			$newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;	// HIGH Importance
3018
+			$newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance
3020 3019
 			if (isset($newmessageprops[PR_SUBJECT])) {
3021 3020
 				$newmessageprops[PR_SUBJECT] = _('Canceled') . ': ' . $newmessageprops[PR_SUBJECT];
3022 3021
 			}
@@ -3200,7 +3199,7 @@  discard block
 block discarded – undo
3200 3199
 	 *
3201 3200
 	 * @return bool true if meeting request is updated later
3202 3201
 	 */
3203
-	public function isMeetingUpdated(false|int $basedate = false): bool {
3202
+	public function isMeetingUpdated(false | int $basedate = false): bool {
3204 3203
 		$result = false;
3205 3204
 
3206 3205
 		$props = mapi_getprops($this->message, [PR_MESSAGE_CLASS, $this->proptags['updatecounter']]);
@@ -3424,7 +3423,7 @@  discard block
 block discarded – undo
3424 3423
 	 *
3425 3424
 	 * @psalm-return bool|int<1, max>
3426 3425
 	 */
3427
-	public function isMeetingConflicting(mixed $message = false, mixed $userStore = false, mixed $calFolder = false): bool|int {
3426
+	public function isMeetingConflicting(mixed $message = false, mixed $userStore = false, mixed $calFolder = false): bool | int {
3428 3427
 		$returnValue = false;
3429 3428
 		$noOfInstances = 0;
3430 3429
 
@@ -3619,7 +3618,7 @@  discard block
 block discarded – undo
3619 3618
 	 *
3620 3619
 	 * @return false|string $meetingTimeInfo info about meeting timing along with message body
3621 3620
 	 */
3622
-	public function getMeetingTimeInfo(): false|string {
3621
+	public function getMeetingTimeInfo(): false | string {
3623 3622
 		return $this->meetingTimeInfo;
3624 3623
 	}
3625 3624
 
@@ -3629,7 +3628,7 @@  discard block
 block discarded – undo
3629 3628
 	 *
3630 3629
 	 * @param string $meetingTimeInfo info about meeting timing along with message body
3631 3630
 	 */
3632
-	public function setMeetingTimeInfo(false|string $meetingTimeInfo, bool $html = false): void {
3631
+	public function setMeetingTimeInfo(false | string $meetingTimeInfo, bool $html = false): void {
3633 3632
 		$this->meetingTimeInfo = $meetingTimeInfo;
3634 3633
 		$this->mti_html = $html;
3635 3634
 	}
@@ -3833,8 +3832,7 @@  discard block
 block discarded – undo
3833 3832
 		$recipientTable = mapi_message_getrecipienttable($message);
3834 3833
 
3835 3834
 		return empty($restriction) ?
3836
-			mapi_table_queryallrows($recipientTable, $this->recipprops) :
3837
-			mapi_table_queryallrows($recipientTable, $this->recipprops, $restriction);
3835
+			mapi_table_queryallrows($recipientTable, $this->recipprops) : mapi_table_queryallrows($recipientTable, $this->recipprops, $restriction);
3838 3836
 	}
3839 3837
 
3840 3838
 	/**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2846,7 +2846,8 @@
 block discarded – undo
2846 2846
 			if ($this->mti_html) {
2847 2847
 				unset($newmessageprops[PR_BODY], $newmessageprops[PR_RTF_COMPRESSED]);
2848 2848
 				$newmessageprops[PR_HTML] = $meetingTimeInfo;
2849
-			} else {
2849
+			}
2850
+			else {
2850 2851
 				unset($newmessageprops[PR_HTML], $newmessageprops[PR_RTF_COMPRESSED]);
2851 2852
 				$newmessageprops[PR_BODY] = $meetingTimeInfo;
2852 2853
 			}
Please login to merge, or discard this patch.