Total Complexity | 130 |
Total Lines | 702 |
Duplicated Lines | 0 % |
Changes | 5 | ||
Bugs | 2 | Features | 0 |
Complex classes like MAPIUtils often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use MAPIUtils, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
11 | class MAPIUtils { |
||
12 | /** |
||
13 | * Create a MAPI restriction to use within an email folder which will |
||
14 | * return all messages since since $timestamp. |
||
15 | * |
||
16 | * @param long $timestamp Timestamp since when to include messages |
||
|
|||
17 | * |
||
18 | * @return array |
||
19 | */ |
||
20 | public static function GetEmailRestriction($timestamp) { |
||
21 | // ATTENTION: ON CHANGING THIS RESTRICTION, MAPIUtils::IsInEmailSyncInterval() also needs to be changed |
||
22 | return [ |
||
23 | RES_PROPERTY, |
||
24 | [ |
||
25 | RELOP => RELOP_GE, |
||
26 | ULPROPTAG => PR_MESSAGE_DELIVERY_TIME, |
||
27 | VALUE => $timestamp, |
||
28 | ], |
||
29 | ]; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Create a MAPI restriction to use in the calendar which will |
||
34 | * return all future calendar items, plus those since $timestamp. |
||
35 | * |
||
36 | * @param MAPIStore $store the MAPI store |
||
37 | * @param long $timestamp Timestamp since when to include messages |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | // TODO getting named properties |
||
42 | public static function GetCalendarRestriction($store, $timestamp) { |
||
43 | // This is our viewing window |
||
44 | $start = $timestamp; |
||
45 | $end = 0x7FFFFFFF; // infinite end |
||
46 | |||
47 | $props = MAPIMapping::GetAppointmentProperties(); |
||
48 | $props = getPropIdsFromStrings($store, $props); |
||
49 | |||
50 | // ATTENTION: ON CHANGING THIS RESTRICTION, MAPIUtils::IsInCalendarSyncInterval() also needs to be changed |
||
51 | return [ |
||
52 | RES_OR, |
||
53 | [ |
||
54 | // OR |
||
55 | // item.end > window.start && item.start < window.end |
||
56 | [ |
||
57 | RES_AND, |
||
58 | [ |
||
59 | [ |
||
60 | RES_PROPERTY, |
||
61 | [ |
||
62 | RELOP => RELOP_LE, |
||
63 | ULPROPTAG => $props["starttime"], |
||
64 | VALUE => $end, |
||
65 | ], |
||
66 | ], |
||
67 | [ |
||
68 | RES_PROPERTY, |
||
69 | [ |
||
70 | RELOP => RELOP_GE, |
||
71 | ULPROPTAG => $props["endtime"], |
||
72 | VALUE => $start, |
||
73 | ], |
||
74 | ], |
||
75 | ], |
||
76 | ], |
||
77 | // OR |
||
78 | [ |
||
79 | RES_OR, |
||
80 | [ |
||
81 | // OR |
||
82 | // (EXIST(recurrence_enddate_property) && item[isRecurring] == true && recurrence_enddate_property >= start) |
||
83 | [ |
||
84 | RES_AND, |
||
85 | [ |
||
86 | [ |
||
87 | RES_EXIST, |
||
88 | [ULPROPTAG => $props["recurrenceend"], |
||
89 | ], |
||
90 | ], |
||
91 | [ |
||
92 | RES_PROPERTY, |
||
93 | [ |
||
94 | RELOP => RELOP_EQ, |
||
95 | ULPROPTAG => $props["isrecurring"], |
||
96 | VALUE => true, |
||
97 | ], |
||
98 | ], |
||
99 | [ |
||
100 | RES_PROPERTY, |
||
101 | [ |
||
102 | RELOP => RELOP_GE, |
||
103 | ULPROPTAG => $props["recurrenceend"], |
||
104 | VALUE => $start, |
||
105 | ], |
||
106 | ], |
||
107 | ], |
||
108 | ], |
||
109 | // OR |
||
110 | // (!EXIST(recurrence_enddate_property) && item[isRecurring] == true && item[start] <= end) |
||
111 | [ |
||
112 | RES_AND, |
||
113 | [ |
||
114 | [ |
||
115 | RES_NOT, |
||
116 | [ |
||
117 | [ |
||
118 | RES_EXIST, |
||
119 | [ULPROPTAG => $props["recurrenceend"], |
||
120 | ], |
||
121 | ], |
||
122 | ], |
||
123 | ], |
||
124 | [ |
||
125 | RES_PROPERTY, |
||
126 | [ |
||
127 | RELOP => RELOP_LE, |
||
128 | ULPROPTAG => $props["starttime"], |
||
129 | VALUE => $end, |
||
130 | ], |
||
131 | ], |
||
132 | [ |
||
133 | RES_PROPERTY, |
||
134 | [ |
||
135 | RELOP => RELOP_EQ, |
||
136 | ULPROPTAG => $props["isrecurring"], |
||
137 | VALUE => true, |
||
138 | ], |
||
139 | ], |
||
140 | ], |
||
141 | ], |
||
142 | ], |
||
143 | ], // EXISTS OR |
||
144 | ], |
||
145 | ]; // global OR |
||
146 | } |
||
147 | |||
148 | /** |
||
149 | * Create a MAPI restriction in order to check if a contact has a picture. |
||
150 | * |
||
151 | * @return array |
||
152 | */ |
||
153 | public static function GetContactPicRestriction() { |
||
160 | ], |
||
161 | ]; |
||
162 | } |
||
163 | |||
164 | /** |
||
165 | * Create a MAPI restriction for search. |
||
166 | * |
||
167 | * @param string $query |
||
168 | * |
||
169 | * @return array |
||
170 | */ |
||
171 | public static function GetSearchRestriction($query) { |
||
221 | ], |
||
222 | ], |
||
223 | ], |
||
224 | ], // RES_OR |
||
225 | ], // RES_AND |
||
226 | ]; |
||
227 | } |
||
228 | |||
229 | /** |
||
230 | * Create a MAPI restriction for a certain email address. |
||
231 | * |
||
232 | * @param MAPIStore $store the MAPI store |
||
233 | * @param mixed $email |
||
234 | * |
||
235 | * @return array |
||
236 | */ |
||
237 | public static function GetEmailAddressRestriction($store, $email) { |
||
266 | ], |
||
267 | ], |
||
268 | ], |
||
269 | ]; |
||
270 | } |
||
271 | |||
272 | /** |
||
273 | * Create a MAPI restriction for a certain folder type. |
||
274 | * |
||
275 | * @param string $foldertype folder type for restriction |
||
276 | * |
||
277 | * @return array |
||
278 | */ |
||
279 | public static function GetFolderTypeRestriction($foldertype) { |
||
280 | return [ |
||
281 | RES_PROPERTY, |
||
282 | [ |
||
283 | RELOP => RELOP_EQ, |
||
284 | ULPROPTAG => PR_CONTAINER_CLASS, |
||
285 | VALUE => [PR_CONTAINER_CLASS => $foldertype], |
||
286 | ], |
||
287 | ]; |
||
288 | } |
||
289 | |||
290 | /** |
||
291 | * Returns subfolders of given type for a folder or false if there are none. |
||
292 | * |
||
293 | * @param MAPIFolder $folder |
||
294 | * @param string $type |
||
295 | * |
||
296 | * @return bool|MAPITable |
||
297 | */ |
||
298 | public static function GetSubfoldersForType($folder, $type) { |
||
299 | $subfolders = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH); |
||
300 | mapi_table_restrict($subfolders, MAPIUtils::GetFolderTypeRestriction($type)); |
||
301 | if (mapi_table_getrowcount($subfolders) > 0) { |
||
302 | return mapi_table_queryallrows($subfolders, [PR_ENTRYID]); |
||
303 | } |
||
304 | |||
305 | return false; |
||
306 | } |
||
307 | |||
308 | /** |
||
309 | * Checks if mapimessage is inside the synchronization interval |
||
310 | * also defined by MAPIUtils::GetEmailRestriction(). |
||
311 | * |
||
312 | * @param MAPIStore $store mapi store |
||
313 | * @param MAPIMessage $mapimessage the mapi message to be checked |
||
314 | * @param long $timestamp the lower time limit |
||
315 | * |
||
316 | * @return bool |
||
317 | */ |
||
318 | public static function IsInEmailSyncInterval($store, $mapimessage, $timestamp) { |
||
319 | $p = mapi_getprops($mapimessage, [PR_MESSAGE_DELIVERY_TIME]); |
||
320 | |||
321 | if (isset($p[PR_MESSAGE_DELIVERY_TIME]) && $p[PR_MESSAGE_DELIVERY_TIME] >= $timestamp) { |
||
322 | SLog::Write(LOGLEVEL_DEBUG, "MAPIUtils->IsInEmailSyncInterval: Message is in the synchronization interval"); |
||
323 | |||
324 | return true; |
||
325 | } |
||
326 | |||
327 | SLog::Write(LOGLEVEL_WARN, "MAPIUtils->IsInEmailSyncInterval: Message is OUTSIDE the synchronization interval"); |
||
328 | |||
329 | return false; |
||
330 | } |
||
331 | |||
332 | /** |
||
333 | * Checks if mapimessage is inside the synchronization interval |
||
334 | * also defined by MAPIUtils::GetCalendarRestriction(). |
||
335 | * |
||
336 | * @param MAPIStore $store mapi store |
||
337 | * @param MAPIMessage $mapimessage the mapi message to be checked |
||
338 | * @param long $timestamp the lower time limit |
||
339 | * |
||
340 | * @return bool |
||
341 | */ |
||
342 | public static function IsInCalendarSyncInterval($store, $mapimessage, $timestamp) { |
||
343 | // This is our viewing window |
||
344 | $start = $timestamp; |
||
345 | $end = 0x7FFFFFFF; // infinite end |
||
346 | |||
347 | $props = MAPIMapping::GetAppointmentProperties(); |
||
348 | $props = getPropIdsFromStrings($store, $props); |
||
349 | |||
350 | $p = mapi_getprops($mapimessage, [$props["starttime"], $props["endtime"], $props["recurrenceend"], $props["isrecurring"], $props["recurrenceend"]]); |
||
351 | |||
352 | if ( |
||
353 | ( |
||
354 | isset($p[$props["endtime"]], $p[$props["starttime"]]) && |
||
355 | // item.end > window.start && item.start < window.end |
||
356 | $p[$props["endtime"]] > $start && $p[$props["starttime"]] < $end |
||
357 | ) || |
||
358 | ( |
||
359 | isset($p[$props["isrecurring"]], $p[$props["recurrenceend"]]) && |
||
360 | // (EXIST(recurrence_enddate_property) && item[isRecurring] == true && recurrence_enddate_property >= start) |
||
361 | $p[$props["isrecurring"]] == true && $p[$props["recurrenceend"]] >= $start |
||
362 | ) || |
||
363 | ( |
||
364 | isset($p[$props["isrecurring"]], $p[$props["starttime"]]) && |
||
365 | // (!EXIST(recurrence_enddate_property) && item[isRecurring] == true && item[start] <= end) |
||
366 | !isset($p[$props["recurrenceend"]]) && $p[$props["isrecurring"]] == true && $p[$props["starttime"]] <= $end |
||
367 | ) |
||
368 | ) { |
||
369 | SLog::Write(LOGLEVEL_DEBUG, "MAPIUtils->IsInCalendarSyncInterval: Message is in the synchronization interval"); |
||
370 | |||
371 | return true; |
||
372 | } |
||
373 | |||
374 | SLog::Write(LOGLEVEL_WARN, "MAPIUtils->IsInCalendarSyncInterval: Message is OUTSIDE the synchronization interval"); |
||
375 | |||
376 | return false; |
||
377 | } |
||
378 | |||
379 | /** |
||
380 | * Checks if mapimessage is in a shared folder and private. |
||
381 | * |
||
382 | * @param string $folderid binary folderid of the message |
||
383 | * @param MAPIMessage $mapimessage the mapi message to be checked |
||
384 | * |
||
385 | * @return bool |
||
386 | */ |
||
387 | public static function IsMessageSharedAndPrivate($folderid, $mapimessage) { |
||
406 | } |
||
407 | |||
408 | /** |
||
409 | * Reads data of large properties from a stream. |
||
410 | * |
||
411 | * @param MAPIMessage $message |
||
412 | * @param long $prop |
||
413 | * |
||
414 | * @return string |
||
415 | */ |
||
416 | public static function readPropStream($message, $prop) { |
||
440 | } |
||
441 | |||
442 | /** |
||
443 | * Checks if a store supports properties containing unicode characters. |
||
444 | * |
||
445 | * @param MAPIStore $store |
||
446 | */ |
||
447 | public static function IsUnicodeStore($store) { |
||
448 | $supportmask = mapi_getprops($store, [PR_STORE_SUPPORT_MASK]); |
||
449 | if (isset($supportmask[PR_STORE_SUPPORT_MASK]) && ($supportmask[PR_STORE_SUPPORT_MASK] & STORE_UNICODE_OK)) { |
||
450 | SLog::Write(LOGLEVEL_DEBUG, "Store supports properties containing Unicode characters."); |
||
451 | define('STORE_INTERNET_CPID', INTERNET_CPID_UTF8); |
||
452 | } |
||
453 | } |
||
454 | |||
455 | /** |
||
456 | * Returns the MAPI PR_CONTAINER_CLASS string for an ActiveSync Foldertype. |
||
457 | * |
||
458 | * @param int $foldertype |
||
459 | * |
||
460 | * @return string |
||
461 | */ |
||
462 | public static function GetContainerClassFromFolderType($foldertype) { |
||
463 | switch ($foldertype) { |
||
464 | case SYNC_FOLDER_TYPE_TASK: |
||
465 | case SYNC_FOLDER_TYPE_USER_TASK: |
||
466 | return "IPF.Task"; |
||
467 | break; |
||
468 | |||
469 | case SYNC_FOLDER_TYPE_APPOINTMENT: |
||
470 | case SYNC_FOLDER_TYPE_USER_APPOINTMENT: |
||
471 | return "IPF.Appointment"; |
||
472 | break; |
||
473 | |||
474 | case SYNC_FOLDER_TYPE_CONTACT: |
||
475 | case SYNC_FOLDER_TYPE_USER_CONTACT: |
||
476 | return "IPF.Contact"; |
||
477 | break; |
||
478 | |||
479 | case SYNC_FOLDER_TYPE_NOTE: |
||
480 | case SYNC_FOLDER_TYPE_USER_NOTE: |
||
481 | return "IPF.StickyNote"; |
||
482 | break; |
||
483 | |||
484 | case SYNC_FOLDER_TYPE_JOURNAL: |
||
485 | case SYNC_FOLDER_TYPE_USER_JOURNAL: |
||
486 | return "IPF.Journal"; |
||
487 | break; |
||
488 | |||
489 | case SYNC_FOLDER_TYPE_INBOX: |
||
490 | case SYNC_FOLDER_TYPE_DRAFTS: |
||
491 | case SYNC_FOLDER_TYPE_WASTEBASKET: |
||
492 | case SYNC_FOLDER_TYPE_SENTMAIL: |
||
493 | case SYNC_FOLDER_TYPE_OUTBOX: |
||
494 | case SYNC_FOLDER_TYPE_USER_MAIL: |
||
495 | case SYNC_FOLDER_TYPE_OTHER: |
||
496 | case SYNC_FOLDER_TYPE_UNKNOWN: |
||
497 | default: |
||
498 | return "IPF.Note"; |
||
499 | break; |
||
500 | } |
||
501 | } |
||
502 | |||
503 | /** |
||
504 | * Returns the ActiveSync (USER) Foldertype from MAPI PR_CONTAINER_CLASS. |
||
505 | * |
||
506 | * @param mixed $class |
||
507 | * |
||
508 | * @return int |
||
509 | */ |
||
510 | public static function GetFolderTypeFromContainerClass($class) { |
||
511 | if ($class == "IPF.Note") { |
||
512 | return SYNC_FOLDER_TYPE_USER_MAIL; |
||
513 | } |
||
514 | if ($class == "IPF.Task") { |
||
515 | return SYNC_FOLDER_TYPE_USER_TASK; |
||
516 | } |
||
517 | if ($class == "IPF.Appointment") { |
||
518 | return SYNC_FOLDER_TYPE_USER_APPOINTMENT; |
||
519 | } |
||
520 | if ($class == "IPF.Contact") { |
||
521 | return SYNC_FOLDER_TYPE_USER_CONTACT; |
||
522 | } |
||
523 | if ($class == "IPF.StickyNote") { |
||
524 | return SYNC_FOLDER_TYPE_USER_NOTE; |
||
525 | } |
||
526 | if ($class == "IPF.Journal") { |
||
527 | return SYNC_FOLDER_TYPE_USER_JOURNAL; |
||
528 | } |
||
529 | |||
530 | return SYNC_FOLDER_TYPE_OTHER; |
||
531 | } |
||
532 | |||
533 | /** |
||
534 | * Calculates the native body type of a message using available properties. Refer to oxbbody. |
||
535 | * |
||
536 | * @param array $messageprops |
||
537 | * |
||
538 | * @return int |
||
539 | */ |
||
540 | public static function GetNativeBodyType($messageprops) { |
||
541 | // check if the properties are set and get the error code if needed |
||
542 | if (!isset($messageprops[PR_BODY])) { |
||
543 | $messageprops[PR_BODY] = self::GetError(PR_BODY, $messageprops); |
||
544 | } |
||
545 | if (!isset($messageprops[PR_RTF_COMPRESSED])) { |
||
546 | $messageprops[PR_RTF_COMPRESSED] = self::GetError(PR_RTF_COMPRESSED, $messageprops); |
||
547 | } |
||
548 | if (!isset($messageprops[PR_HTML])) { |
||
549 | $messageprops[PR_HTML] = self::GetError(PR_HTML, $messageprops); |
||
550 | } |
||
551 | if (!isset($messageprops[PR_RTF_IN_SYNC])) { |
||
552 | $messageprops[PR_RTF_IN_SYNC] = self::GetError(PR_RTF_IN_SYNC, $messageprops); |
||
553 | } |
||
554 | |||
555 | if ( // 1 |
||
556 | ($messageprops[PR_BODY] == MAPI_E_NOT_FOUND) && |
||
557 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_FOUND) && |
||
558 | ($messageprops[PR_HTML] == MAPI_E_NOT_FOUND)) { |
||
559 | return SYNC_BODYPREFERENCE_PLAIN; |
||
560 | } |
||
561 | if ( // 2 |
||
562 | ($messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
563 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_FOUND) && |
||
564 | ($messageprops[PR_HTML] == MAPI_E_NOT_FOUND)) { |
||
565 | return SYNC_BODYPREFERENCE_PLAIN; |
||
566 | } |
||
567 | if ( // 3 |
||
568 | ($messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
569 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
570 | ($messageprops[PR_HTML] == MAPI_E_NOT_FOUND)) { |
||
571 | return SYNC_BODYPREFERENCE_PLAIN; |
||
572 | } |
||
573 | if ( // 4 |
||
574 | ($messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
575 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
576 | ($messageprops[PR_HTML] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
577 | $messageprops[PR_RTF_IN_SYNC]) { |
||
578 | return SYNC_BODYPREFERENCE_PLAIN; |
||
579 | } |
||
580 | if ( // 5 |
||
581 | ($messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
582 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
583 | ($messageprops[PR_HTML] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
584 | (!$messageprops[PR_RTF_IN_SYNC])) { |
||
585 | return SYNC_BODYPREFERENCE_HTML; |
||
586 | } |
||
587 | if ( // 6 |
||
588 | ($messageprops[PR_RTF_COMPRESSED] != MAPI_E_NOT_FOUND || $messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
589 | ($messageprops[PR_HTML] != MAPI_E_NOT_FOUND || $messageprops[PR_HTML] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
590 | $messageprops[PR_RTF_IN_SYNC]) { |
||
591 | return SYNC_BODYPREFERENCE_PLAIN; |
||
592 | } |
||
593 | if ( // 7 |
||
594 | ($messageprops[PR_RTF_COMPRESSED] != MAPI_E_NOT_FOUND || $messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
595 | ($messageprops[PR_HTML] != MAPI_E_NOT_FOUND || $messageprops[PR_HTML] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
596 | (!$messageprops[PR_RTF_IN_SYNC])) { |
||
597 | return SYNC_BODYPREFERENCE_HTML; |
||
598 | } |
||
599 | if ( // 8 |
||
600 | ($messageprops[PR_BODY] != MAPI_E_NOT_FOUND || $messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
601 | ($messageprops[PR_RTF_COMPRESSED] != MAPI_E_NOT_FOUND || $messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
602 | $messageprops[PR_RTF_IN_SYNC]) { |
||
603 | return SYNC_BODYPREFERENCE_PLAIN; |
||
604 | } |
||
605 | if ( // 9.1 |
||
606 | ($messageprops[PR_BODY] != MAPI_E_NOT_FOUND || $messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
607 | ($messageprops[PR_RTF_COMPRESSED] != MAPI_E_NOT_FOUND || $messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
608 | (!$messageprops[PR_RTF_IN_SYNC])) { |
||
609 | return SYNC_BODYPREFERENCE_PLAIN; |
||
610 | } |
||
611 | if ( // 9.2 |
||
612 | ($messageprops[PR_RTF_COMPRESSED] != MAPI_E_NOT_FOUND || $messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
613 | ($messageprops[PR_BODY] == MAPI_E_NOT_FOUND) && |
||
614 | ($messageprops[PR_HTML] == MAPI_E_NOT_FOUND)) { |
||
615 | return SYNC_BODYPREFERENCE_PLAIN; |
||
616 | } |
||
617 | if ( // 9.3 |
||
618 | ($messageprops[PR_BODY] != MAPI_E_NOT_FOUND || $messageprops[PR_BODY] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
619 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_FOUND) && |
||
620 | ($messageprops[PR_HTML] == MAPI_E_NOT_FOUND)) { |
||
621 | return SYNC_BODYPREFERENCE_PLAIN; |
||
622 | } |
||
623 | if ( // 9.4 |
||
624 | ($messageprops[PR_HTML] != MAPI_E_NOT_FOUND || $messageprops[PR_HTML] == MAPI_E_NOT_ENOUGH_MEMORY) && |
||
625 | ($messageprops[PR_BODY] == MAPI_E_NOT_FOUND) && |
||
626 | ($messageprops[PR_RTF_COMPRESSED] == MAPI_E_NOT_FOUND)) { |
||
627 | return SYNC_BODYPREFERENCE_HTML; |
||
628 | } |
||
629 | |||
630 | // 10 |
||
631 | return SYNC_BODYPREFERENCE_PLAIN; |
||
632 | } |
||
633 | |||
634 | /** |
||
635 | * Returns the error code for a given property. |
||
636 | * Helper for MAPIUtils::GetNativeBodyType() function but also used in other places. |
||
637 | * |
||
638 | * @param int $tag |
||
639 | * @param array $messageprops |
||
640 | * |
||
641 | * @return int (MAPI_ERROR_CODE) |
||
642 | */ |
||
643 | public static function GetError($tag, $messageprops) { |
||
653 | } |
||
654 | |||
655 | /** |
||
656 | * Function will be used to decode smime messages and convert it to normal messages. |
||
657 | * |
||
658 | * @param MAPISession $session |
||
659 | * @param MAPIStore $store |
||
660 | * @param MAPIAdressBook $addressBook |
||
661 | * @param mixed $mapimessage |
||
662 | */ |
||
663 | public static function ParseSmime($session, $store, $addressBook, &$mapimessage) { |
||
713 | ]); |
||
714 | } |
||
715 | // TODO check if we need to do this for encrypted (and signed?) message as well |
||
716 | } |
||
717 | } |
||
718 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths