@@ -59,6 +59,9 @@ discard block |
||
| 59 | 59 | class VTEventConditionParserLexer_DFA9 extends DFA |
| 60 | 60 | { |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param VTEventConditionParserLexer $recognizer |
|
| 64 | + */ |
|
| 62 | 65 | public function __construct($recognizer) |
| 63 | 66 | { |
| 64 | 67 | global $VTEventConditionParserLexer_DFA9; |
@@ -108,6 +111,9 @@ discard block |
||
| 108 | 111 | // delegates |
| 109 | 112 | // delegators |
| 110 | 113 | |
| 114 | + /** |
|
| 115 | + * @param ANTLRStringStream $input |
|
| 116 | + */ |
|
| 111 | 117 | public function __construct($input, $state = null) |
| 112 | 118 | { |
| 113 | 119 | parent::__construct($input, $state); |
@@ -250,8 +250,10 @@ discard block |
||
| 250 | 250 | break; |
| 251 | 251 | |
| 252 | 252 | default : |
| 253 | - if ($cnt1 >= 1) |
|
| 254 | - break 2; //loop1; |
|
| 253 | + if ($cnt1 >= 1) { |
|
| 254 | + break 2; |
|
| 255 | + } |
|
| 256 | + //loop1; |
|
| 255 | 257 | $eee = new EarlyExitException(1, $this->input); |
| 256 | 258 | throw $eee; |
| 257 | 259 | } |
@@ -309,8 +311,10 @@ discard block |
||
| 309 | 311 | break; |
| 310 | 312 | |
| 311 | 313 | default : |
| 312 | - if ($cnt2 >= 1) |
|
| 313 | - break 2; //loop2; |
|
| 314 | + if ($cnt2 >= 1) { |
|
| 315 | + break 2; |
|
| 316 | + } |
|
| 317 | + //loop2; |
|
| 314 | 318 | $eee = new EarlyExitException(2, $this->input); |
| 315 | 319 | throw $eee; |
| 316 | 320 | } |
@@ -405,8 +409,10 @@ discard block |
||
| 405 | 409 | break; |
| 406 | 410 | |
| 407 | 411 | default : |
| 408 | - if ($cnt4 >= 1) |
|
| 409 | - break 2; //loop4; |
|
| 412 | + if ($cnt4 >= 1) { |
|
| 413 | + break 2; |
|
| 414 | + } |
|
| 415 | + //loop4; |
|
| 410 | 416 | $eee = new EarlyExitException(4, $this->input); |
| 411 | 417 | throw $eee; |
| 412 | 418 | } |
@@ -468,8 +474,10 @@ discard block |
||
| 468 | 474 | break; |
| 469 | 475 | |
| 470 | 476 | default : |
| 471 | - if ($cnt6 >= 1) |
|
| 472 | - break 2; //loop6; |
|
| 477 | + if ($cnt6 >= 1) { |
|
| 478 | + break 2; |
|
| 479 | + } |
|
| 480 | + //loop6; |
|
| 473 | 481 | $eee = new EarlyExitException(6, $this->input); |
| 474 | 482 | throw $eee; |
| 475 | 483 | } |
@@ -495,8 +503,10 @@ discard block |
||
| 495 | 503 | break; |
| 496 | 504 | |
| 497 | 505 | default : |
| 498 | - if ($cnt7 >= 1) |
|
| 499 | - break 2; //loop7; |
|
| 506 | + if ($cnt7 >= 1) { |
|
| 507 | + break 2; |
|
| 508 | + } |
|
| 509 | + //loop7; |
|
| 500 | 510 | $eee = new EarlyExitException(7, $this->input); |
| 501 | 511 | throw $eee; |
| 502 | 512 | } |
@@ -573,8 +583,10 @@ discard block |
||
| 573 | 583 | break; |
| 574 | 584 | |
| 575 | 585 | default : |
| 576 | - if ($cnt8 >= 1) |
|
| 577 | - break 2; //loop8; |
|
| 586 | + if ($cnt8 >= 1) { |
|
| 587 | + break 2; |
|
| 588 | + } |
|
| 589 | + //loop8; |
|
| 578 | 590 | $eee = new EarlyExitException(8, $this->input); |
| 579 | 591 | throw $eee; |
| 580 | 592 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | * Function to get start and end date of present calendar quarter |
| 267 | 267 | * @param int $month |
| 268 | 268 | * @param DateTime $dateObject |
| 269 | - * @return date range of present quarter |
|
| 269 | + * @return string[] range of present quarter |
|
| 270 | 270 | */ |
| 271 | 271 | public static function getPresentQuarterRange($month = null, &$dateObject = null) |
| 272 | 272 | { |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * Function to get start and end date of previous calendar quarter |
| 300 | 300 | * @param int $month |
| 301 | 301 | * @param DateTime $dateObject |
| 302 | - * @return date range of present quarter |
|
| 302 | + * @return string[] range of present quarter |
|
| 303 | 303 | */ |
| 304 | 304 | public static function getPreviousQuarterRange($month = null, &$dateObject = null) |
| 305 | 305 | { |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * Function to get start and end date of next calendar quarter |
| 334 | 334 | * @param int $month |
| 335 | 335 | * @param DateTime $dateObject |
| 336 | - * @return date range of present quarter |
|
| 336 | + * @return string[] range of present quarter |
|
| 337 | 337 | */ |
| 338 | 338 | public static function getNextQuarterRange($month = null, $dateObject = null) |
| 339 | 339 | { |
@@ -29,6 +29,9 @@ |
||
| 29 | 29 | return $ns . '-' . $key; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $namespace |
|
| 34 | + */ |
|
| 32 | 35 | public function set($namespace, $key, $value) |
| 33 | 36 | { |
| 34 | 37 | $this->connection->set($this->cacheKey($namespace, $key), $value); |
@@ -24,8 +24,9 @@ |
||
| 24 | 24 | |
| 25 | 25 | protected function cacheKey($ns, $key) |
| 26 | 26 | { |
| 27 | - if (is_array($key)) |
|
| 28 | - $key = implode('-', $key); |
|
| 27 | + if (is_array($key)) { |
|
| 28 | + $key = implode('-', $key); |
|
| 29 | + } |
|
| 29 | 30 | return $ns . '-' . $key; |
| 30 | 31 | } |
| 31 | 32 | |
@@ -11,11 +11,17 @@ |
||
| 11 | 11 | class Vtiger_Cache_Connector_Memory |
| 12 | 12 | { |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param string $key |
|
| 16 | + */ |
|
| 14 | 17 | public function set($key, $value) |
| 15 | 18 | { |
| 16 | 19 | $this->$key = $value; |
| 17 | 20 | } |
| 18 | 21 | |
| 22 | + /** |
|
| 23 | + * @param string $key |
|
| 24 | + */ |
|
| 19 | 25 | public function get($key) |
| 20 | 26 | { |
| 21 | 27 | return isset($this->$key) ? $this->$key : false; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Function to get or set a global variable |
| 13 | - * @param type $key |
|
| 13 | + * @param string $key |
|
| 14 | 14 | * @param type $value |
| 15 | 15 | * @return value of the given key |
| 16 | 16 | */ |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * |
| 18 | - * @param WebserviceId $id |
|
| 18 | + * @param string $id |
|
| 19 | 19 | * @param String $oldPassword |
| 20 | 20 | * @param String $newPassword |
| 21 | 21 | * @param String $confirmPassword |
@@ -12,6 +12,8 @@ |
||
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * @author MAK |
| 15 | + * @param string $id |
|
| 16 | + * @param string $newOwnerId |
|
| 15 | 17 | */ |
| 16 | 18 | function vtws_deleteUser($id, $newOwnerId, $user) |
| 17 | 19 | { |
@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | RecalculateSharingRules(); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $location |
|
| 43 | + */ |
|
| 41 | 44 | public function initializeDatabase($location, $filesName = array()) |
| 42 | 45 | { |
| 43 | 46 | $this->db->query('SET FOREIGN_KEY_CHECKS = 0;'); |
@@ -101,6 +104,9 @@ discard block |
||
| 101 | 104 | createUserPrivilegesfile(1); |
| 102 | 105 | } |
| 103 | 106 | |
| 107 | + /** |
|
| 108 | + * @param string $query |
|
| 109 | + */ |
|
| 104 | 110 | public function _splitQueries($query) |
| 105 | 111 | { |
| 106 | 112 | $buffer = array(); |
@@ -267,8 +267,9 @@ |
||
| 267 | 267 | if ($rootDirectory && strpos($src, $rootDirectory) === false) { |
| 268 | 268 | $src = $rootDirectory . $src; |
| 269 | 269 | } |
| 270 | - if (!file_exists($src) || !$rootDirectory) |
|
| 271 | - return; |
|
| 270 | + if (!file_exists($src) || !$rootDirectory) { |
|
| 271 | + return; |
|
| 272 | + } |
|
| 272 | 273 | @chmod($src, 0777); |
| 273 | 274 | \App\Log::trace("Exiting VT620_to_YT::testest(" . $src . ") method ..."); |
| 274 | 275 | if (is_dir($src)) { |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * To get hour,minute and format |
| 32 | 32 | * @param $starttime -- The date&time :: Type string |
| 33 | 33 | * @param $endtime -- The date&time :: Type string |
| 34 | - * @param $format -- The format :: Type string |
|
| 34 | + * @param string $format -- The format :: Type string |
|
| 35 | 35 | * @returns $timearr :: Type Array |
| 36 | 36 | */ |
| 37 | 37 | function getaddEventPopupTime($starttime, $endtime, $format) |
@@ -21,8 +21,9 @@ discard block |
||
| 21 | 21 | $result = $adb->pquery($query, array($sharedid)); |
| 22 | 22 | if ($adb->num_rows($result) != 0) { |
| 23 | 23 | $countResult = $adb->num_rows($result); |
| 24 | - for ($j = 0; $j < $countResult; $j++) |
|
| 25 | - $userid[] = $adb->query_result($result, $j, 'userid'); |
|
| 24 | + for ($j = 0; $j < $countResult; $j++) { |
|
| 25 | + $userid[] = $adb->query_result($result, $j, 'userid'); |
|
| 26 | + } |
|
| 26 | 27 | $shared_ids = implode(",", $userid); |
| 27 | 28 | } |
| 28 | 29 | return $shared_ids; |
@@ -43,15 +44,17 @@ discard block |
||
| 43 | 44 | if ($format == 'am/pm' || $format == '12') { |
| 44 | 45 | $hr = $sthr + 0; |
| 45 | 46 | $timearr['startfmt'] = ($hr >= 12) ? "pm" : "am"; |
| 46 | - if ($hr == 0) |
|
| 47 | - $hr = 12; |
|
| 47 | + if ($hr == 0) { |
|
| 48 | + $hr = 12; |
|
| 49 | + } |
|
| 48 | 50 | $timearr['starthour'] = twoDigit(($hr > 12) ? ($hr - 12) : $hr); |
| 49 | 51 | $timearr['startmin'] = $stmin; |
| 50 | 52 | |
| 51 | 53 | $edhr = $edhr + 0; |
| 52 | 54 | $timearr['endfmt'] = ($edhr >= 12) ? "pm" : "am"; |
| 53 | - if ($edhr == 0) |
|
| 54 | - $edhr = 12; |
|
| 55 | + if ($edhr == 0) { |
|
| 56 | + $edhr = 12; |
|
| 57 | + } |
|
| 55 | 58 | $timearr['endhour'] = twoDigit(($edhr > 12) ? ($edhr - 12) : $edhr); |
| 56 | 59 | $timearr['endmin'] = $edmin; |
| 57 | 60 | return $timearr; |
@@ -99,10 +102,11 @@ discard block |
||
| 99 | 102 | $startDate = new DateTimeField($description['st_date_time']); |
| 100 | 103 | $endDate = new DateTimeField($description['end_date_time']); |
| 101 | 104 | |
| 102 | - if ($from == "invite") |
|
| 103 | - $msg = \App\Language::translate($mod_strings['LBL_ACTIVITY_INVITATION']); |
|
| 104 | - else |
|
| 105 | - $msg = \App\Language::translate($mod_strings['LBL_ACTIVITY_NOTIFICATION']); |
|
| 105 | + if ($from == "invite") { |
|
| 106 | + $msg = \App\Language::translate($mod_strings['LBL_ACTIVITY_INVITATION']); |
|
| 107 | + } else { |
|
| 108 | + $msg = \App\Language::translate($mod_strings['LBL_ACTIVITY_NOTIFICATION']); |
|
| 109 | + } |
|
| 106 | 110 | |
| 107 | 111 | $currentUsername = \App\Fields\Owner::getUserLabel($currentUser->id); |
| 108 | 112 | $status = \App\Language::translate($description['status'], 'Calendar'); |
@@ -116,8 +120,9 @@ discard block |
||
| 116 | 120 | $list .= '<br> ' . $mod_strings["Related To"] . ': ' . \App\Language::translate($description['relatedto']); |
| 117 | 121 | if (!empty($description['contact_name'])) { |
| 118 | 122 | $list .= '<br> ' . $mod_strings["LBL_CONTACT_LIST"] . ' ' . $description['contact_name']; |
| 119 | - } else |
|
| 120 | - $list .= '<br> ' . $mod_strings["Location"] . ' : ' . $description['location']; |
|
| 123 | + } else { |
|
| 124 | + $list .= '<br> ' . $mod_strings["Location"] . ' : ' . $description['location']; |
|
| 125 | + } |
|
| 121 | 126 | |
| 122 | 127 | $list .= '<br> ' . $mod_strings["LBL_APP_DESCRIPTION"] . ': ' . $description['description']; |
| 123 | 128 | $list .= '<br><br>' . $mod_strings["LBL_REGARDS_STRING"] . ' ,'; |
@@ -129,11 +134,12 @@ discard block |
||
| 129 | 134 | |
| 130 | 135 | function twoDigit($no) |
| 131 | 136 | { |
| 132 | - if ($no < 10 && strlen(trim($no)) < 2) |
|
| 133 | - return "0" . $no; |
|
| 134 | - else |
|
| 135 | - return "" . $no; |
|
| 136 | -} |
|
| 137 | + if ($no < 10 && strlen(trim($no)) < 2) { |
|
| 138 | + return "0" . $no; |
|
| 139 | + } else { |
|
| 140 | + return "" . $no; |
|
| 141 | + } |
|
| 142 | + } |
|
| 137 | 143 | |
| 138 | 144 | // User Select Customization |
| 139 | 145 | /** |
@@ -144,8 +150,9 @@ discard block |
||
| 144 | 150 | { |
| 145 | 151 | $currentUser = Users_Privileges_Model::getCurrentUserModel(); |
| 146 | 152 | $onlyForUser = htmlspecialchars(strip_tags(AppRequest::getForSql('onlyforuser')), ENT_QUOTES, AppConfig::main('default_charset')); |
| 147 | - if ($onlyForUser == '') |
|
| 148 | - $onlyForUser = $currentUser->id; |
|
| 153 | + if ($onlyForUser == '') { |
|
| 154 | + $onlyForUser = $currentUser->id; |
|
| 155 | + } |
|
| 149 | 156 | return $onlyForUser; |
| 150 | 157 | } |
| 151 | 158 | |
@@ -161,10 +168,11 @@ discard block |
||
| 161 | 168 | if ($onlyForUser == $currentUser->id) { |
| 162 | 169 | $userGroupIds = fetchUserGroupids($currentUser->id); |
| 163 | 170 | // User does not belong to any group? Let us reset to non-existent group |
| 164 | - if (!empty($userGroupIds)) |
|
| 165 | - $userGroupIds .= ','; |
|
| 166 | - else |
|
| 167 | - $userGroupIds = ''; |
|
| 171 | + if (!empty($userGroupIds)) { |
|
| 172 | + $userGroupIds .= ','; |
|
| 173 | + } else { |
|
| 174 | + $userGroupIds = ''; |
|
| 175 | + } |
|
| 168 | 176 | $userGroupIds .= $currentUser->id; |
| 169 | 177 | $qcondition = " && vtiger_crmentity.smownerid IN (" . $userGroupIds . ")"; |
| 170 | 178 | } else { |