@@ -351,6 +351,10 @@ discard block |
||
351 | 351 | * Check if the template is cached |
352 | 352 | * return a bool |
353 | 353 | */ |
354 | + |
|
355 | + /** |
|
356 | + * @param string $cacheRowFile |
|
357 | + */ |
|
354 | 358 | function checkTemplate($cacheRowFile){ |
355 | 359 | if(inDeveloperMode() || !empty($_SESSION['developerMode'])){ |
356 | 360 | return false; |
@@ -502,6 +506,11 @@ discard block |
||
502 | 506 | |
503 | 507 | |
504 | 508 | |
509 | + /** |
|
510 | + * @param string $view |
|
511 | + * |
|
512 | + * @return string |
|
513 | + */ |
|
505 | 514 | function findTemplate($view){ |
506 | 515 | static $tplCache = array(); |
507 | 516 |
@@ -102,9 +102,8 @@ |
||
102 | 102 | /** |
103 | 103 | * format the currency field based on system locale values for currency |
104 | 104 | * Note that this may be different from the precision specified in the vardefs. |
105 | - * @param string $rawfield value of the field |
|
106 | - * @param string $somewhere vardef for the field being processed |
|
107 | - * @return number formatted according to currency settings |
|
105 | + * @param string $rawField value of the field |
|
106 | + * @return string formatted according to currency settings |
|
108 | 107 | */ |
109 | 108 | public function formatField($rawField, $vardef) |
110 | 109 | { |
@@ -94,6 +94,7 @@ |
||
94 | 94 | |
95 | 95 | /** |
96 | 96 | * @see SugarFieldBase::importSanitize() |
97 | + * @param string $value |
|
97 | 98 | */ |
98 | 99 | public function importSanitize( |
99 | 100 | $value, |
@@ -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(); |