@@ -253,7 +253,7 @@ |
||
253 | 253 | * |
254 | 254 | * @param $value string |
255 | 255 | * @param $format string |
256 | - * @return string sanitized and validated value on success, bool false on failure |
|
256 | + * @return boolean sanitized and validated value on success, bool false on failure |
|
257 | 257 | */ |
258 | 258 | public function isValidTimeDate( |
259 | 259 | $value, |
@@ -192,13 +192,6 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * Save |
194 | 194 | * |
195 | - * @param string $owner_id |
|
196 | - * @param string $name |
|
197 | - * @param string $module |
|
198 | - * @param string $source |
|
199 | - * @param string $has_header |
|
200 | - * @param string $delimiter |
|
201 | - * @param string $enclosure |
|
202 | 195 | * @return bool |
203 | 196 | */ |
204 | 197 | public function save($check_notify = FALSE) { |
@@ -362,7 +355,6 @@ discard block |
||
362 | 355 | /** |
363 | 356 | * set and get field elements in request field to and from user preferences |
364 | 357 | * |
365 | - * @param array $fields_array |
|
366 | 358 | * @return array $obj_arr |
367 | 359 | */ |
368 | 360 | public function set_get_import_wizard_fields($ForceValsArr = '') |
@@ -107,7 +107,6 @@ |
||
107 | 107 | * external field name and the rvalue equal to the actual value. |
108 | 108 | * |
109 | 109 | * @abstract |
110 | - * @param int $startIndex |
|
111 | 110 | * @param int $maxResults |
112 | 111 | * @return void |
113 | 112 | */ |
@@ -393,6 +393,9 @@ |
||
393 | 393 | return $this->_time_format; |
394 | 394 | } |
395 | 395 | |
396 | + /** |
|
397 | + * @param boolean $hasHeader |
|
398 | + */ |
|
396 | 399 | public function setHeaderRow($hasHeader) |
397 | 400 | { |
398 | 401 | $this->_hasHeader = $hasHeader; |
@@ -84,7 +84,7 @@ |
||
84 | 84 | * Create a list view object that can display a data source which implements the Paginatable interface. |
85 | 85 | * |
86 | 86 | * @throws Exception |
87 | - * @param Paginatable $dataSource |
|
87 | + * @param ImportFile $dataSource |
|
88 | 88 | * @param array $params |
89 | 89 | * @param string $tableIdentifier |
90 | 90 | */ |
@@ -227,6 +227,9 @@ discard block |
||
227 | 227 | return get_select_options_with_id($GLOBALS['app_list_strings']['import_delimeter_options'], $selctedDelim); |
228 | 228 | } |
229 | 229 | |
230 | + /** |
|
231 | + * @param string $enclosure |
|
232 | + */ |
|
230 | 233 | private function getEnclosureOptions($enclosure) |
231 | 234 | { |
232 | 235 | $results = array(); |
@@ -392,6 +395,9 @@ discard block |
||
392 | 395 | $this->ss->assign('TIMEZONEOPTIONS', TimeDate::getTimezoneList()); |
393 | 396 | } |
394 | 397 | |
398 | + /** |
|
399 | + * @param ImportFile $importFile |
|
400 | + */ |
|
395 | 401 | private function setImportFileCharacterSet($importFile, $field_map = array()) |
396 | 402 | { |
397 | 403 | global $locale; |
@@ -431,6 +437,9 @@ discard block |
||
431 | 437 | return $maxColumns; |
432 | 438 | } |
433 | 439 | |
440 | + /** |
|
441 | + * @param ImportFile $importFile |
|
442 | + */ |
|
434 | 443 | public function getSampleSet($importFile) |
435 | 444 | { |
436 | 445 | $rows = array(); |
@@ -456,6 +465,7 @@ discard block |
||
456 | 465 | |
457 | 466 | /** |
458 | 467 | * Returns JS used in this view |
468 | + * @param boolean $maxRecordsExceeded |
|
459 | 469 | */ |
460 | 470 | private function _getJS($maxRecordsExceeded, $maxRecordsWarningMessg, $importMappingJS, $importFileMap) |
461 | 471 | { |
@@ -186,6 +186,10 @@ discard block |
||
186 | 186 | |
187 | 187 | } |
188 | 188 | |
189 | + /** |
|
190 | + * @param string $fileName |
|
191 | + * @param string $tableName |
|
192 | + */ |
|
189 | 193 | protected function getListViewTableFromFile($fileName, $tableName) |
190 | 194 | { |
191 | 195 | $has_header = $_REQUEST['has_header'] == 'on' ? TRUE : FALSE; |
@@ -197,6 +201,7 @@ discard block |
||
197 | 201 | |
198 | 202 | /** |
199 | 203 | * Returns JS used in this view |
204 | + * @param integer $activeTab |
|
200 | 205 | */ |
201 | 206 | private function _getJS($activeTab) |
202 | 207 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Replaces embedded image links with links to the appropriate note in the CRM. |
31 | - * @param $string |
|
31 | + * @param string $string |
|
32 | 32 | * @param $noteIds A whitelist of note ids to replace |
33 | 33 | * @return mixed |
34 | 34 | */ |
@@ -53,6 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | |
56 | + /** |
|
57 | + * @param Email $email |
|
58 | + */ |
|
56 | 59 | function handleCreateCase($email, $userId) { |
57 | 60 | global $current_user, $mod_strings, $current_language; |
58 | 61 | $mod_strings = return_module_language($current_language, "Emails"); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | /** |
191 | 191 | * retrieves I-E bean |
192 | 192 | * @param string id |
193 | - * @return object Bean |
|
193 | + * @return InboundEmail|null Bean |
|
194 | 194 | */ |
195 | 195 | function retrieve($id = -1, $encode=true, $deleted=true) { |
196 | 196 | $ret = parent::retrieve($id,$encode,$deleted); |
@@ -453,6 +453,7 @@ discard block |
||
453 | 453 | /** |
454 | 454 | * sets the cache timestamp |
455 | 455 | * @param string mbox |
456 | + * @param string $mbox |
|
456 | 457 | */ |
457 | 458 | function setCacheTimestamp($mbox) { |
458 | 459 | $key = $this->db->quote("{$this->id}_{$mbox}"); |
@@ -486,6 +487,7 @@ discard block |
||
486 | 487 | /** |
487 | 488 | * Returns total number of emails for a mailbox |
488 | 489 | * @param string mbox |
490 | + * @param string $mbox |
|
489 | 491 | * @return int |
490 | 492 | */ |
491 | 493 | function getCacheCount($mbox) { |
@@ -541,6 +543,7 @@ discard block |
||
541 | 543 | |
542 | 544 | /** |
543 | 545 | * Retrieves cached headers |
546 | + * @param string|null $mbox |
|
544 | 547 | * @return array |
545 | 548 | */ |
546 | 549 | function getCacheValueForUIDs($mbox, $UIDs) { |
@@ -1726,7 +1729,6 @@ discard block |
||
1726 | 1729 | * Deletes cached messages when moving from folder to folder |
1727 | 1730 | * @param string $uids |
1728 | 1731 | * @param string $fromFolder |
1729 | - * @param string $toFolder |
|
1730 | 1732 | */ |
1731 | 1733 | function deleteCachedMessages($uids, $fromFolder) { |
1732 | 1734 | global $sugar_config; |
@@ -2544,31 +2546,65 @@ discard block |
||
2544 | 2546 | } |
2545 | 2547 | } |
2546 | 2548 | |
2549 | + /** |
|
2550 | + * @param string $server_url |
|
2551 | + * @param string $email_user |
|
2552 | + * @param string $port |
|
2553 | + */ |
|
2547 | 2554 | function getSessionConnectionString($server_url, $email_user, $port, $protocol) { |
2548 | 2555 | $sessionConnectionString = $server_url . $email_user . $port . $protocol; |
2549 | 2556 | return (isset($_SESSION[$sessionConnectionString]) ? $_SESSION[$sessionConnectionString] : ""); |
2550 | 2557 | } |
2551 | 2558 | |
2559 | + /** |
|
2560 | + * @param string $server_url |
|
2561 | + * @param string $email_user |
|
2562 | + * @param string $port |
|
2563 | + * @param string $protocol |
|
2564 | + */ |
|
2552 | 2565 | function setSessionConnectionString($server_url, $email_user, $port, $protocol, $goodStr) { |
2553 | 2566 | $sessionConnectionString = $server_url . $email_user . $port . $protocol; |
2554 | 2567 | $_SESSION[$sessionConnectionString] = $goodStr; |
2555 | 2568 | } |
2556 | 2569 | |
2570 | + /** |
|
2571 | + * @param string $server_url |
|
2572 | + * @param string $email_user |
|
2573 | + * @param string $port |
|
2574 | + */ |
|
2557 | 2575 | function getSessionInboundDelimiterString($server_url, $email_user, $port, $protocol) { |
2558 | 2576 | $sessionInboundDelimiterString = $server_url . $email_user . $port . $protocol . "delimiter"; |
2559 | 2577 | return (isset($_SESSION[$sessionInboundDelimiterString]) ? $_SESSION[$sessionInboundDelimiterString] : ""); |
2560 | 2578 | } |
2561 | 2579 | |
2580 | + /** |
|
2581 | + * @param string $server_url |
|
2582 | + * @param string $email_user |
|
2583 | + * @param string $port |
|
2584 | + * @param string $protocol |
|
2585 | + */ |
|
2562 | 2586 | function setSessionInboundDelimiterString($server_url, $email_user, $port, $protocol, $delimiter) { |
2563 | 2587 | $sessionInboundDelimiterString = $server_url . $email_user . $port . $protocol . "delimiter"; |
2564 | 2588 | $_SESSION[$sessionInboundDelimiterString] = $delimiter; |
2565 | 2589 | } |
2566 | 2590 | |
2591 | + /** |
|
2592 | + * @param string $server_url |
|
2593 | + * @param string $email_user |
|
2594 | + * @param string $port |
|
2595 | + * @param string $protocol |
|
2596 | + */ |
|
2567 | 2597 | function getSessionInboundFoldersString($server_url, $email_user, $port, $protocol) { |
2568 | 2598 | $sessionInboundFoldersListString = $server_url . $email_user . $port . $protocol . "foldersList"; |
2569 | 2599 | return (isset($_SESSION[$sessionInboundFoldersListString]) ? $_SESSION[$sessionInboundFoldersListString] : ""); |
2570 | 2600 | } |
2571 | 2601 | |
2602 | + /** |
|
2603 | + * @param string $server_url |
|
2604 | + * @param string $email_user |
|
2605 | + * @param string $port |
|
2606 | + * @param string $protocol |
|
2607 | + */ |
|
2572 | 2608 | function setSessionInboundFoldersString($server_url, $email_user, $port, $protocol, $foldersList) { |
2573 | 2609 | $sessionInboundFoldersListString = $server_url . $email_user . $port . $protocol . "foldersList"; |
2574 | 2610 | $_SESSION[$sessionInboundFoldersListString] = $foldersList; |
@@ -2727,6 +2763,7 @@ discard block |
||
2727 | 2763 | * |
2728 | 2764 | * @param object email Email object passed as a reference |
2729 | 2765 | * @param object header Header object generated by imap_headerinfo(); |
2766 | + * @param Email $email |
|
2730 | 2767 | */ |
2731 | 2768 | function handleMailboxType(&$email, &$header) { |
2732 | 2769 | switch($this->mailbox_type) { |
@@ -2761,6 +2798,9 @@ discard block |
||
2761 | 2798 | return ($this->mailbox_type == 'createcase' && !empty($this->groupfolder_id)); |
2762 | 2799 | } // fn |
2763 | 2800 | |
2801 | + /** |
|
2802 | + * @param Email $email |
|
2803 | + */ |
|
2764 | 2804 | function handleCreateCase($email, $userId) { |
2765 | 2805 | global $current_user, $mod_strings, $current_language; |
2766 | 2806 | $mod_strings = return_module_language($current_language, "Emails"); |
@@ -3002,7 +3042,8 @@ discard block |
||
3002 | 3042 | * takes a breadcrumb and returns the encoding at that level |
3003 | 3043 | * @param string bc the breadcrumb string in format (1.1.1) |
3004 | 3044 | * @param array parts the root level parts array |
3005 | - * @return int retInt Int key to transfer encoding (see handleTranserEncoding()) |
|
3045 | + * @param string $bc |
|
3046 | + * @return string retInt Int key to transfer encoding (see handleTranserEncoding()) |
|
3006 | 3047 | */ |
3007 | 3048 | function getEncodingFromBreadCrumb($bc, $parts) { |
3008 | 3049 | if(strstr($bc,'.')) { |
@@ -3028,6 +3069,7 @@ discard block |
||
3028 | 3069 | * |
3029 | 3070 | * @param string bc target part of the message in format (1.1.1) |
3030 | 3071 | * @param array parts 1 level above ROOT array of Objects representing a multipart body |
3072 | + * @param string $bc |
|
3031 | 3073 | * @return string charset name |
3032 | 3074 | */ |
3033 | 3075 | function getCharsetFromBreadCrumb($bc, $parts) |
@@ -3096,6 +3138,7 @@ discard block |
||
3096 | 3138 | * |
3097 | 3139 | * @param int msgNo the relative message number for the monitored mailbox |
3098 | 3140 | * @param string $type the type of text processed, either 'PLAIN' or 'HTML' |
3141 | + * @param string $fullHeader |
|
3099 | 3142 | * @return string UTF-8 encoded version of the requested message text |
3100 | 3143 | */ |
3101 | 3144 | function getMessageText($msgNo, $type, $structure, $fullHeader,$clean_email=true, $bcOffset = "") { |
@@ -3254,7 +3297,7 @@ discard block |
||
3254 | 3297 | * Builds up the "breadcrumb" trail that imap_fetchbody() uses to return |
3255 | 3298 | * parts of an email message, including attachments and inline images |
3256 | 3299 | * @param $parts array of objects |
3257 | - * @param $subtype what type of trail to return? HTML? Plain? binaries? |
|
3300 | + * @param string $subtype what type of trail to return? HTML? Plain? binaries? |
|
3258 | 3301 | * @param $breadcrumb text trail to build up |
3259 | 3302 | */ |
3260 | 3303 | function buildBreadCrumbs($parts, $subtype, $breadcrumb = '0') { |
@@ -3577,6 +3620,8 @@ discard block |
||
3577 | 3620 | * @param string thisBc Breadcrumb to navigate email structure to find the content |
3578 | 3621 | * @param object part IMAP standard object that contains the "parts" of this section of email |
3579 | 3622 | * @param bool $forDisplay |
3623 | + * @param null|Note $attach |
|
3624 | + * @param integer $msgNo |
|
3580 | 3625 | */ |
3581 | 3626 | function saveAttachmentBinaries($attach, $msgNo, $thisBc, $part, $forDisplay) { |
3582 | 3627 | // decide where to place the file temporarily |
@@ -3620,7 +3665,7 @@ discard block |
||
3620 | 3665 | /** |
3621 | 3666 | * decodes a string based on its associated encoding |
3622 | 3667 | * if nothing is passed, we default to no-encoding type |
3623 | - * @param $str encoded string |
|
3668 | + * @param string $str encoded string |
|
3624 | 3669 | * @param $enc detected encoding |
3625 | 3670 | */ |
3626 | 3671 | function handleTranserEncoding($str, $enc=0) { |
@@ -3666,6 +3711,7 @@ discard block |
||
3666 | 3711 | * @param int message number (mailserver's key) of email |
3667 | 3712 | * @param object header object generated by imap_headerinfo() |
3668 | 3713 | * @param string textHeader Headers in normal text format |
3714 | + * @param string $textHeader |
|
3669 | 3715 | * @return bool |
3670 | 3716 | */ |
3671 | 3717 | function importDupeCheck($message_id, $header, $textHeader) { |
@@ -4195,6 +4241,8 @@ discard block |
||
4195 | 4241 | * handles UU Encoded emails - a legacy from pre-RFC 822 which must still be supported (?) |
4196 | 4242 | * @param string raw The raw email body |
4197 | 4243 | * @param string id Parent email ID |
4244 | + * @param string $raw |
|
4245 | + * @param string $id |
|
4198 | 4246 | * @return string The filtered email body, stripped of attachments |
4199 | 4247 | */ |
4200 | 4248 | function handleUUEncodedEmailBody($raw, $id) { |
@@ -4241,6 +4289,8 @@ discard block |
||
4241 | 4289 | * wrapper for UUDecode |
4242 | 4290 | * @param string id Id of the email |
4243 | 4291 | * @param string UUEncode Encode US-ASCII |
4292 | + * @param string $fileName |
|
4293 | + * @param string $UUEncode |
|
4244 | 4294 | */ |
4245 | 4295 | function handleUUDecode($id, $fileName, $UUEncode) { |
4246 | 4296 | global $sugar_config; |
@@ -4523,6 +4573,9 @@ discard block |
||
4523 | 4573 | return false; |
4524 | 4574 | } |
4525 | 4575 | |
4576 | + /** |
|
4577 | + * @param string $option_name |
|
4578 | + */ |
|
4526 | 4579 | function get_stored_options($option_name,$default_value=null,$stored_options=null) { |
4527 | 4580 | if (empty($stored_options) && isset($this)) { |
4528 | 4581 | $stored_options=$this->stored_options; |
@@ -4541,6 +4594,7 @@ discard block |
||
4541 | 4594 | * This function returns a contact or user ID if a matching email is found |
4542 | 4595 | * @param $email the email address to match |
4543 | 4596 | * @param $table which table to query |
4597 | + * @param string $module |
|
4544 | 4598 | */ |
4545 | 4599 | function getRelatedId($email, $module) { |
4546 | 4600 | $email = trim(strtoupper($email)); |
@@ -4786,7 +4840,7 @@ discard block |
||
4786 | 4840 | * @param string $password The password associated with the username |
4787 | 4841 | * @param integer $options Bitmask for options parameter to the imap_open function |
4788 | 4842 | * |
4789 | - * @return resource|boolean Connection resource on success, FALSE on failure |
|
4843 | + * @return resource|null Connection resource on success, FALSE on failure |
|
4790 | 4844 | */ |
4791 | 4845 | protected function getImapConnection($mailbox, $username, $password, $options = 0) |
4792 | 4846 | { |
@@ -5371,6 +5425,7 @@ discard block |
||
5371 | 5425 | /** |
5372 | 5426 | * Gets the UIDL from database for the corresponding msgno |
5373 | 5427 | * @param int messageNo of a message |
5428 | + * @param integer $msgNo |
|
5374 | 5429 | * @return UIDL for the message |
5375 | 5430 | */ |
5376 | 5431 | function getUIDLForMessage($msgNo) { |
@@ -5403,6 +5458,7 @@ discard block |
||
5403 | 5458 | * Get the users default IE account id |
5404 | 5459 | * |
5405 | 5460 | * @param User $user |
5461 | + * @param string $oe_id |
|
5406 | 5462 | */ |
5407 | 5463 | function setUsersDefaultOutboundServerId($user,$oe_id) |
5408 | 5464 | { |
@@ -5509,6 +5565,8 @@ discard block |
||
5509 | 5565 | |
5510 | 5566 | /** |
5511 | 5567 | * Sets status for a particular attribute on the mailserver and the local cache file |
5568 | + * @param string $field |
|
5569 | + * @param integer $value |
|
5512 | 5570 | */ |
5513 | 5571 | function setStatuses($uid, $field, $value) { |
5514 | 5572 | global $sugar_config; |
@@ -5585,6 +5643,7 @@ discard block |
||
5585 | 5643 | * @param int uid UID of email to display |
5586 | 5644 | * @param string mbox Mailbox to look in for the message |
5587 | 5645 | * @param bool isMsgNo Flag to assume $uid is a MessageNo, not UniqueID, default false |
5646 | + * @param string|null $mbox |
|
5588 | 5647 | */ |
5589 | 5648 | function displayOneEmail($uid, $mbox, $isMsgNo=false) { |
5590 | 5649 | require_once("include/JSON.php"); |
@@ -5787,7 +5846,7 @@ discard block |
||
5787 | 5846 | /** |
5788 | 5847 | * Sorts IMAP's imap_fetch_overview() results |
5789 | 5848 | * @param array $arr Array of standard objects |
5790 | - * @param string $sort Column to sort by |
|
5849 | + * @param integer $sort Column to sort by |
|
5791 | 5850 | * @param string direction Direction to sort by (asc/desc) |
5792 | 5851 | * @return array Sorted array of obj. |
5793 | 5852 | */ |
@@ -5897,6 +5956,7 @@ discard block |
||
5897 | 5956 | * Returns a list of emails in a mailbox. |
5898 | 5957 | * @param string mbox Name of mailbox using dot notation paths to display |
5899 | 5958 | * @param string $forceRefresh Flag to use cache or not |
5959 | + * @param string $mbox |
|
5900 | 5960 | */ |
5901 | 5961 | function displayFolderContents($mbox, $forceRefresh='false', $page) { |
5902 | 5962 | global $current_user; |
@@ -6238,7 +6298,6 @@ discard block |
||
6238 | 6298 | |
6239 | 6299 | /** |
6240 | 6300 | * sorts the folders in a mailbox in a multi-dimensional array |
6241 | - * @param string $MBOX |
|
6242 | 6301 | * @param array $ret |
6243 | 6302 | * @return array |
6244 | 6303 | */ |