@@ -419,6 +419,9 @@ |
||
| 419 | 419 | ]; |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | + /** |
|
| 423 | + * @param string $name |
|
| 424 | + */ |
|
| 422 | 425 | public function checkFieldNameCharacters($name) |
| 423 | 426 | { |
| 424 | 427 | if (preg_match('#[^a-z0-9_]#is', $name) || !preg_match('/[a-z]/i', $name)) { |
@@ -212,6 +212,7 @@ discard block |
||
| 212 | 212 | * @param int $id - accountid |
| 213 | 213 | * @param array $parentAccounts - Array of all the parent accounts |
| 214 | 214 | * returns All the parent accounts of the given accountid in array format |
| 215 | + * @param integer[] $encounteredAccounts |
|
| 215 | 216 | */ |
| 216 | 217 | public function __getParentAccounts($id, &$parentAccounts, &$encounteredAccounts, $depthBase = 0) |
| 217 | 218 | { |
@@ -266,7 +267,7 @@ discard block |
||
| 266 | 267 | * |
| 267 | 268 | * @param int $id - accountid |
| 268 | 269 | * @param array $childAccounts - Array of all the child accounts |
| 269 | - * @param int $depth - Depth at which the particular account has to be placed in the hierarchy |
|
| 270 | + * @param int $depthBase - Depth at which the particular account has to be placed in the hierarchy |
|
| 270 | 271 | * returns All the child accounts of the given accountid in array format |
| 271 | 272 | */ |
| 272 | 273 | public function __getChildAccounts($id, &$childAccounts, $depthBase) |
@@ -152,6 +152,10 @@ discard block |
||
| 152 | 152 | return $hierarchy; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + /** |
|
| 156 | + * @param integer $id |
|
| 157 | + * @param integer[] $encounteredAccounts |
|
| 158 | + */ |
|
| 155 | 159 | public function __getParentEmployees($id, &$parentAccounts, &$encounteredAccounts) |
| 156 | 160 | { |
| 157 | 161 | \App\Log::trace('Entering __getParentEmployees(' . $id . ',' . $parentAccounts . ') method ...'); |
@@ -193,6 +197,9 @@ discard block |
||
| 193 | 197 | return $parentAccounts; |
| 194 | 198 | } |
| 195 | 199 | |
| 200 | + /** |
|
| 201 | + * @param integer $id |
|
| 202 | + */ |
|
| 196 | 203 | public function __getChildEmployees($id, &$childAccounts, $depth) |
| 197 | 204 | { |
| 198 | 205 | \App\Log::trace('Entering __getChildEmployees(' . $id . ',' . $childAccounts . ',' . $depth . ') method ...'); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * Function to get main configuration of system. |
| 25 | 25 | * |
| 26 | 26 | * @param string $key |
| 27 | - * @param mixed $value |
|
| 27 | + * @param string|false $value |
|
| 28 | 28 | * |
| 29 | 29 | * @return mixed |
| 30 | 30 | */ |
@@ -89,11 +89,17 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $key |
|
| 94 | + */ |
|
| 92 | 95 | public static function api($key, $defvalue = false) |
| 93 | 96 | { |
| 94 | 97 | return self::$api[$key] ?? $defvalue; |
| 95 | 98 | } |
| 96 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $key |
|
| 102 | + */ |
|
| 97 | 103 | public static function debug($key, $defvalue = false) |
| 98 | 104 | { |
| 99 | 105 | if (empty(self::$debug)) { |
@@ -103,6 +109,9 @@ discard block |
||
| 103 | 109 | return self::$debug[$key] ?? $defvalue; |
| 104 | 110 | } |
| 105 | 111 | |
| 112 | + /** |
|
| 113 | + * @param string $key |
|
| 114 | + */ |
|
| 106 | 115 | public static function developer($key, $defvalue = false) |
| 107 | 116 | { |
| 108 | 117 | if (empty(self::$developer)) { |
@@ -112,6 +121,9 @@ discard block |
||
| 112 | 121 | return self::$developer[$key] ?? $defvalue; |
| 113 | 122 | } |
| 114 | 123 | |
| 124 | + /** |
|
| 125 | + * @param string $key |
|
| 126 | + */ |
|
| 115 | 127 | public static function security($key, $defvalue = false) |
| 116 | 128 | { |
| 117 | 129 | if (empty(self::$security)) { |
@@ -121,6 +133,9 @@ discard block |
||
| 121 | 133 | return self::$security[$key] ?? $defvalue; |
| 122 | 134 | } |
| 123 | 135 | |
| 136 | + /** |
|
| 137 | + * @param string $key |
|
| 138 | + */ |
|
| 124 | 139 | public static function securityKeys($key, $defvalue = false) |
| 125 | 140 | { |
| 126 | 141 | if (empty(self::$securityKeys)) { |
@@ -130,6 +145,9 @@ discard block |
||
| 130 | 145 | return self::$securityKeys[$key] ?? $defvalue; |
| 131 | 146 | } |
| 132 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $key |
|
| 150 | + */ |
|
| 133 | 151 | public static function performance($key, $defvalue = false) |
| 134 | 152 | { |
| 135 | 153 | if (!self::$performance) { |
@@ -139,6 +157,9 @@ discard block |
||
| 139 | 157 | return self::$performance[$key] ?? $defvalue; |
| 140 | 158 | } |
| 141 | 159 | |
| 160 | + /** |
|
| 161 | + * @param string $key |
|
| 162 | + */ |
|
| 142 | 163 | public static function relation($key, $defvalue = false) |
| 143 | 164 | { |
| 144 | 165 | if (empty(self::$relation)) { |
@@ -162,6 +183,9 @@ discard block |
||
| 162 | 183 | return self::$sounds[$key]; |
| 163 | 184 | } |
| 164 | 185 | |
| 186 | + /** |
|
| 187 | + * @param string $key |
|
| 188 | + */ |
|
| 165 | 189 | public static function search($key, $defvalue = false) |
| 166 | 190 | { |
| 167 | 191 | if (empty(self::$search)) { |
@@ -171,6 +195,9 @@ discard block |
||
| 171 | 195 | return self::$search[$key] ?? $defvalue; |
| 172 | 196 | } |
| 173 | 197 | |
| 198 | + /** |
|
| 199 | + * @param string $key |
|
| 200 | + */ |
|
| 174 | 201 | public static function load($key, $config) |
| 175 | 202 | { |
| 176 | 203 | self::$$key = $config; |
@@ -24,6 +24,9 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | const REMNDER_POPUP_WAIT = 2; |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param false|string $refModuleName |
|
| 29 | + */ |
|
| 27 | 30 | public static function getNameByReference($refModuleName) |
| 28 | 31 | { |
| 29 | 32 | $fieldName = Vtiger_Cache::get('NameRelatedField', $refModuleName . '-Calendar'); |
@@ -49,6 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * {@inheritdoc} |
| 52 | + * @param boolean $value |
|
| 52 | 53 | */ |
| 53 | 54 | public function validate($value, $isUserFormat = false) |
| 54 | 55 | { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | } |
| 56 | 56 | if (!empty($users) && $favouriteUsers = $currentUser->getFavouritesUsers()) { |
| 57 | 57 | uksort($users, |
| 58 | - function ($a, $b) use ($favouriteUsers) { |
|
| 58 | + function($a, $b) use ($favouriteUsers) { |
|
| 59 | 59 | return !isset($favouriteUsers[$a]) && isset($favouriteUsers[$b]); |
| 60 | 60 | }); |
| 61 | 61 | $viewer->assign('FAVOURITES_USERS', $favouriteUsers); |
@@ -237,6 +237,9 @@ discard block |
||
| 237 | 237 | return $this->parent; |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | + /** |
|
| 241 | + * @param integer $callerStatus |
|
| 242 | + */ |
|
| 240 | 243 | public function checkStatus($callerStatus) |
| 241 | 244 | { |
| 242 | 245 | $status = $this->get('status'); |
@@ -414,12 +417,18 @@ discard block |
||
| 414 | 417 | return $relationInstance; |
| 415 | 418 | } |
| 416 | 419 | |
| 420 | + /** |
|
| 421 | + * @param integer $recordId |
|
| 422 | + */ |
|
| 417 | 423 | public static function getTotalRecordCount($recordId, $type = false) |
| 418 | 424 | { |
| 419 | 425 | $where = self::getConditionByType($type); |
| 420 | 426 | return (new \App\Db\Query())->from('vtiger_modtracker_basic')->where(['crmid' => $recordId])->andWhere($where)->count(); |
| 421 | 427 | } |
| 422 | 428 | |
| 429 | + /** |
|
| 430 | + * @param string|boolean $type |
|
| 431 | + */ |
|
| 423 | 432 | public static function getConditionByType($type) |
| 424 | 433 | { |
| 425 | 434 | $where = []; |
@@ -436,6 +445,10 @@ discard block |
||
| 436 | 445 | return $where; |
| 437 | 446 | } |
| 438 | 447 | |
| 448 | + /** |
|
| 449 | + * @param string $sourceModule |
|
| 450 | + * @param integer $current_user |
|
| 451 | + */ |
|
| 439 | 452 | public static function addConvertToAccountRelation($sourceModule, $sourceId, $current_user) |
| 440 | 453 | { |
| 441 | 454 | $db = \App\Db::getInstance(); |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | * |
| 494 | 494 | * @throws \App\Exceptions\NoPermittedToRecord |
| 495 | 495 | * |
| 496 | - * @return mixed |
|
| 496 | + * @return string|boolean |
|
| 497 | 497 | */ |
| 498 | 498 | public function showChildComments(\App\Request $request) |
| 499 | 499 | { |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | * |
| 524 | 524 | * @throws \App\Exceptions\NoPermittedToRecord |
| 525 | 525 | * |
| 526 | - * @return mixed |
|
| 526 | + * @return string|boolean |
|
| 527 | 527 | */ |
| 528 | 528 | public function showParentComments(\App\Request $request) |
| 529 | 529 | { |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | * |
| 553 | 553 | * @throws \App\Exceptions\NoPermittedToRecord |
| 554 | 554 | * |
| 555 | - * @return mixed |
|
| 555 | + * @return string|boolean |
|
| 556 | 556 | */ |
| 557 | 557 | public function showThreadComments(\App\Request $request) |
| 558 | 558 | { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | * |
| 583 | 583 | * @throws \App\Exceptions\NoPermittedToRecord |
| 584 | 584 | * |
| 585 | - * @return mixed |
|
| 585 | + * @return string|boolean |
|
| 586 | 586 | */ |
| 587 | 587 | public function showAllComments(\App\Request $request) |
| 588 | 588 | { |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | * |
| 631 | 631 | * @throws \App\Exceptions\NoPermittedToRecord |
| 632 | 632 | * |
| 633 | - * @return mixed |
|
| 633 | + * @return string|boolean |
|
| 634 | 634 | */ |
| 635 | 635 | public function showSearchComments(\App\Request $request) |
| 636 | 636 | { |
@@ -698,6 +698,7 @@ discard block |
||
| 698 | 698 | * Function to get Ajax is enabled or not. |
| 699 | 699 | * |
| 700 | 700 | * @param Vtiger_Record_Model record model |
| 701 | + * @param boolean $recordModel |
|
| 701 | 702 | * |
| 702 | 703 | * @return bool true/false |
| 703 | 704 | */ |
@@ -1008,7 +1009,7 @@ discard block |
||
| 1008 | 1009 | * @throws \App\Exceptions\IllegalValue |
| 1009 | 1010 | * @throws \App\Exceptions\NoPermittedToRecord |
| 1010 | 1011 | * |
| 1011 | - * @return \html |
|
| 1012 | + * @return string|boolean |
|
| 1012 | 1013 | */ |
| 1013 | 1014 | public function showOpenStreetMap(\App\Request $request) |
| 1014 | 1015 | { |
@@ -1033,7 +1034,7 @@ discard block |
||
| 1033 | 1034 | * @throws \App\Exceptions\IllegalValue |
| 1034 | 1035 | * @throws \App\Exceptions\NoPermittedToRecord |
| 1035 | 1036 | * |
| 1036 | - * @return \html |
|
| 1037 | + * @return string|boolean |
|
| 1037 | 1038 | */ |
| 1038 | 1039 | public function showSocialMedia(\App\Request $request) |
| 1039 | 1040 | { |
@@ -1057,7 +1058,7 @@ discard block |
||
| 1057 | 1058 | * @throws \App\Exceptions\IllegalValue |
| 1058 | 1059 | * @throws \App\Exceptions\NoPermittedToRecord |
| 1059 | 1060 | * |
| 1060 | - * @return \html |
|
| 1061 | + * @return string|boolean |
|
| 1061 | 1062 | */ |
| 1062 | 1063 | public function showChat(\App\Request $request) |
| 1063 | 1064 | { |