@@ -112,6 +112,9 @@ |
||
112 | 112 | |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @param UploadFile $upload_file |
|
117 | + */ |
|
115 | 118 | public function verify_image($upload_file){ |
116 | 119 | global $sugar_config; |
117 | 120 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | /** |
67 | 67 | * parse |
68 | 68 | * |
69 | - * @param $filePath The file path of the HTML file to parse |
|
69 | + * @param string $filePath The file path of the HTML file to parse |
|
70 | 70 | * @param $vardefs The module's vardefs |
71 | 71 | * @param $moduleDir The module's directory |
72 | 72 | * @param $merge boolean value indicating whether or not to merge the parsed contents |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | /** |
97 | 97 | * getFormElementsNames |
98 | 98 | * Parses for the name values of input, select, textarea types from string content |
99 | - * @param $contents The String contents to parse |
|
99 | + * @param string $contents The String contents to parse |
|
100 | 100 | * @return $matches Array of name/value pairs |
101 | 101 | */ |
102 | 102 | function getFormElementsNames($contents) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * getTagAttribute |
110 | 110 | * Returns the name/value of a tag attribute where name is set to $name |
111 | - * @param $name The name of the attribute |
|
111 | + * @param string $name The name of the attribute |
|
112 | 112 | * @param $contents The contents to parse |
113 | 113 | * @param $filter Option regular expression to filter value |
114 | 114 | * @return Array of name/value for matching attribute |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | * and method call getElementsByType("<td>", $contents) returns |
164 | 164 | * "<td>Text <table><tr><td>a</td></tr></table></td>" |
165 | 165 | * |
166 | - * @param $type The type of element to parse out and return |
|
166 | + * @param string $type The type of element to parse out and return |
|
167 | 167 | * @return a tag element format Array |
168 | 168 | */ |
169 | 169 | function getElementsByType($type, $contents) { |
@@ -208,6 +208,7 @@ discard block |
||
208 | 208 | /** |
209 | 209 | * getElementValue |
210 | 210 | * |
211 | + * @param string $type |
|
211 | 212 | */ |
212 | 213 | function getElementValue($type, $contents, $filter = "(.*?)") { |
213 | 214 | $exp = "'<".$type."[^>]*?>".$filter."</".$type."[^>]*?>'si"; |
@@ -244,7 +245,7 @@ discard block |
||
244 | 245 | * Returns the highest number of <td>...</td> blocks within a <tr>...</tr> block. |
245 | 246 | * @param $contents The table contents to parse |
246 | 247 | * @param $filter Optional filter to parse for an attribute within the td block. |
247 | - * @return The maximum column count |
|
248 | + * @return integer maximum column count |
|
248 | 249 | */ |
249 | 250 | function getMaxColumns($contents, $filter) { |
250 | 251 | preg_match_all("'(<tr[^>]*?>)(.*?)(</tr[^>]*?>)'si", $contents, $matches, PREG_SET_ORDER); |
@@ -281,6 +282,9 @@ discard block |
||
281 | 282 | * trimHTML |
282 | 283 | * This function removes the \r (return), \n (newline) and \t (tab) markup from string |
283 | 284 | */ |
285 | +/** |
|
286 | + * @param string $contents |
|
287 | + */ |
|
284 | 288 | function trimHTML($contents) { |
285 | 289 | $contents = str_replace(array("\r"), array(""), $contents); |
286 | 290 | $contents = str_replace(array("\n"), array(""), $contents); |
@@ -342,6 +346,9 @@ discard block |
||
342 | 346 | |
343 | 347 | } |
344 | 348 | |
349 | +/** |
|
350 | + * @param string $javascript |
|
351 | + */ |
|
345 | 352 | static function parseDelimiters($javascript) { |
346 | 353 | $newJavascript = ''; |
347 | 354 | $scriptLength = strlen($javascript); |
@@ -441,7 +448,7 @@ discard block |
||
441 | 448 | * dirList |
442 | 449 | * Utility method to list all the files in a given directory. |
443 | 450 | * |
444 | - * @param $directory The directory to scan |
|
451 | + * @param string $directory The directory to scan |
|
445 | 452 | * @return $results The files in the directory that were found |
446 | 453 | */ |
447 | 454 | function dirList ($directory) { |
@@ -496,6 +503,9 @@ discard block |
||
496 | 503 | return null; |
497 | 504 | } |
498 | 505 | |
506 | +/** |
|
507 | + * @param string $moduleDir |
|
508 | + */ |
|
499 | 509 | function applyPreRules($moduleDir, $panels) { |
500 | 510 | if(file_exists("include/SugarFields/Parsers/Rules/".$moduleDir."ParseRule.php")) { |
501 | 511 | require_once("include/SugarFields/Parsers/Rules/".$moduleDir."ParseRule.php"); |
@@ -506,6 +516,9 @@ discard block |
||
506 | 516 | return $panels; |
507 | 517 | } |
508 | 518 | |
519 | +/** |
|
520 | + * @param string $moduleDir |
|
521 | + */ |
|
509 | 522 | function applyRules($moduleDir, $panels) { |
510 | 523 | return $this->applyPostRules($moduleDir, $panels); |
511 | 524 | } |
@@ -537,6 +550,9 @@ discard block |
||
537 | 550 | return $panels; |
538 | 551 | } |
539 | 552 | |
553 | +/** |
|
554 | + * @param string $moduleDir |
|
555 | + */ |
|
540 | 556 | function createFileContents($moduleDir, $panels, $templateMeta=array(), $htmlFilePath) { |
541 | 557 | |
542 | 558 | $header = "<?php\n\n"; |
@@ -587,7 +603,7 @@ discard block |
||
587 | 603 | * mergePanels |
588 | 604 | * This function merges the $panels Array against the $masterCopy's meta data definition |
589 | 605 | * @param $panels meta data Array to merge |
590 | - * @param $moduleDir Directory name of the module |
|
606 | + * @param string $moduleDir Directory name of the module |
|
591 | 607 | * @param $masterCopy file path to the meta data master copy |
592 | 608 | * @return Array of merged $panel definition |
593 | 609 | */ |
@@ -680,7 +696,7 @@ discard block |
||
680 | 696 | * mergeTemplateMeta |
681 | 697 | * This function merges the $templateMeta Array against the $masterCopy's meta data definition |
682 | 698 | * @param $templateMeta meta data Array to merge |
683 | - * @param $moduleDir Directory name of the module |
|
699 | + * @param string $moduleDir Directory name of the module |
|
684 | 700 | * @param $masterCopy file path to the meta data master copy |
685 | 701 | * @return Array of merged $templateMeta definition |
686 | 702 | */ |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * have not been moved from the address panel |
114 | 114 | * |
115 | 115 | * @param $addressPanel Array of address panel contents |
116 | - * @param $suffix The address suffix (billing, shipping, primary, alternate) to check for |
|
116 | + * @param string $suffix The address suffix (billing, shipping, primary, alternate) to check for |
|
117 | 117 | * @return boolean |
118 | 118 | */ |
119 | 119 | function hasAddressFieldsIntact($addressPanel, $suffix) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * This function scans the panels and locates the street address field for the given key |
136 | 136 | * and replaces the Array definition (from the merging process) with a String value. |
137 | 137 | * @param $panels Array of the view's panels |
138 | - * @param $street String key value of the street to search for |
|
138 | + * @param string $street String key value of the street to search for |
|
139 | 139 | * @returns $panels Array of view's panels with street value substituted |
140 | 140 | */ |
141 | 141 | function removeStreetFieldOverride($panels, $street) { |
@@ -75,6 +75,9 @@ discard block |
||
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | |
78 | +/** |
|
79 | + * @param string $regExp |
|
80 | + */ |
|
78 | 81 | function matches($mixed, $regExp) { |
79 | 82 | if(is_array($mixed) && isset($mixed['name']) && preg_match($regExp, $mixed['name'])) { |
80 | 83 | return true; |
@@ -84,6 +87,9 @@ discard block |
||
84 | 87 | return false; |
85 | 88 | } |
86 | 89 | |
90 | +/** |
|
91 | + * @param string $regExp |
|
92 | + */ |
|
87 | 93 | function getMatch($mixed, $regExp) { |
88 | 94 | if(is_array($mixed) && isset($mixed['name']) && preg_match($regExp, $mixed['name'], $matches)) { |
89 | 95 | return $matches; |
@@ -137,6 +137,9 @@ discard block |
||
137 | 137 | return $section; |
138 | 138 | } |
139 | 139 | |
140 | +/** |
|
141 | + * @param string $section |
|
142 | + */ |
|
140 | 143 | function processSection($section, $table, $filePath, $vardefs=array()) { |
141 | 144 | |
142 | 145 | $toptr = $this->getElementsByType("tr", $table); |
@@ -251,6 +254,9 @@ discard block |
||
251 | 254 | return $metarow; |
252 | 255 | } |
253 | 256 | |
257 | +/** |
|
258 | + * @param string $moduleDir |
|
259 | + */ |
|
254 | 260 | function applyRules($moduleDir, $section=array()) { |
255 | 261 | require_once('include/SugarFields/Parsers/Rules/BaseRule.php'); |
256 | 262 | $baseRule = new BaseRule(); |
@@ -47,6 +47,9 @@ |
||
47 | 47 | function SugarFieldHandler() { |
48 | 48 | } |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $field |
|
52 | + */ |
|
50 | 53 | static function fixupFieldType($field) { |
51 | 54 | switch($field) { |
52 | 55 | case 'double': |
@@ -126,6 +126,8 @@ discard block |
||
126 | 126 | * @param string fromFolder GUID of source folder |
127 | 127 | * @param string toFolder GUID of destination folder |
128 | 128 | * @param string beanId GUID of SugarBean being moved |
129 | + * @param string $fromFolder |
|
130 | + * @param string $toFolder |
|
129 | 131 | */ |
130 | 132 | function move($fromFolder, $toFolder, $beanId) { |
131 | 133 | $q = "UPDATE folders_rel SET folder_id = '{$toFolder}' WHERE folder_id = '{$fromFolder}' AND polymorphic_id = '{$beanId}' AND deleted = 0"; |
@@ -134,6 +136,9 @@ discard block |
||
134 | 136 | |
135 | 137 | /** |
136 | 138 | * Copies one bean from one folder to another |
139 | + * @param string $fromFolder |
|
140 | + * @param string $toFolder |
|
141 | + * @param string $module |
|
137 | 142 | */ |
138 | 143 | function copyBean($fromFolder, $toFolder, $beanId, $module) { |
139 | 144 | $q = "INSERT INTO folders_rel (id, folder_id, polymorphic_module, polymorphic_id, deleted) |
@@ -448,6 +453,7 @@ discard block |
||
448 | 453 | |
449 | 454 | /** |
450 | 455 | * Convenience method, pass a SugarBean and User to this to add anything to a given folder |
456 | + * @param Email $bean |
|
451 | 457 | */ |
452 | 458 | function addBean($bean, $user=null) { |
453 | 459 | if(empty($bean->id) || empty($bean->module_dir)) { |
@@ -742,6 +748,7 @@ discard block |
||
742 | 748 | |
743 | 749 | /** |
744 | 750 | * Builds children nodes for folders for TreeView |
751 | + * @param string $nodePath |
|
745 | 752 | * @return $folderNode TreeView node |
746 | 753 | */ |
747 | 754 | function buildTreeNodeFolders($a, $nodePath, $folderStates, $subscriptions) { |
@@ -47,8 +47,8 @@ |
||
47 | 47 | /** |
48 | 48 | * Main method for handling logging a message to the logger |
49 | 49 | * |
50 | - * @param string $level logging level for the message |
|
51 | 50 | * @param string $message |
51 | + * @return void |
|
52 | 52 | */ |
53 | 53 | public function log( |
54 | 54 | $method, |