@@ -38,6 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @param int Source parent record id |
40 | 40 | * @param int Target parent record id |
41 | + * @param integer $targetParentId |
|
41 | 42 | */ |
42 | 43 | public static function transferRecords($currentParentId, $targetParentId) |
43 | 44 | { |
@@ -66,7 +67,7 @@ discard block |
||
66 | 67 | /** |
67 | 68 | * Add widget to other module. |
68 | 69 | * |
69 | - * @param unknown_type $moduleNames |
|
70 | + * @param string[] $moduleNames |
|
70 | 71 | * |
71 | 72 | * @return unknown_type |
72 | 73 | */ |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | * |
501 | 501 | * @param int $whoTrigger |
502 | 502 | * |
503 | - * @return bool|string |
|
503 | + * @return string|false |
|
504 | 504 | */ |
505 | 505 | public function executeCron($whoTrigger) |
506 | 506 | { |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | * |
609 | 609 | * @param array $array |
610 | 610 | * |
611 | - * @return int|bool |
|
611 | + * @return string |
|
612 | 612 | */ |
613 | 613 | public function addScanHistory($array) |
614 | 614 | { |
@@ -45,6 +45,9 @@ discard block |
||
45 | 45 | \App\Cache::clearOpcache(); |
46 | 46 | } |
47 | 47 | |
48 | + /** |
|
49 | + * @param string $location |
|
50 | + */ |
|
48 | 51 | public function initializeDatabase($location, $filesName = []) |
49 | 52 | { |
50 | 53 | try { |
@@ -113,6 +116,9 @@ discard block |
||
113 | 116 | \App\UserPrivilegesFile::createUserPrivilegesfile(1); |
114 | 117 | } |
115 | 118 | |
119 | + /** |
|
120 | + * @param string $query |
|
121 | + */ |
|
116 | 122 | public function splitQueries($query) |
117 | 123 | { |
118 | 124 | $buffer = []; |
@@ -548,7 +548,7 @@ |
||
548 | 548 | /** |
549 | 549 | * Get project data to display in view as gantt. |
550 | 550 | * |
551 | - * @param int|string $id |
|
551 | + * @param integer $id |
|
552 | 552 | * |
553 | 553 | * @return array - projects,milestones,tasks |
554 | 554 | */ |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | private function findOutStartDates(&$node) |
283 | 283 | { |
284 | 284 | $maxTimeStampValue = 2147483647; |
285 | - $firstDate = $this->iterateNodes($node, $maxTimeStampValue, function (&$child, $firstDate) { |
|
285 | + $firstDate = $this->iterateNodes($node, $maxTimeStampValue, function(&$child, $firstDate) { |
|
286 | 286 | if (!empty($child['start_date']) && $child['start_date'] !== '1970-01-01') { |
287 | 287 | $taskStartDate = strtotime($child['start_date']); |
288 | 288 | if ($taskStartDate < $firstDate && $taskStartDate > 0) { |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $node['start'] = date('Y-m-d H:i:s', $firstDate); |
301 | 301 | } |
302 | 302 | // iterate one more time setting up empty dates |
303 | - $this->iterateNodes($node, $firstDate, function (&$child, $firstDate) { |
|
303 | + $this->iterateNodes($node, $firstDate, function(&$child, $firstDate) { |
|
304 | 304 | if (empty($child['start_date']) || $child['start_date'] === '1970-01-01') { |
305 | 305 | $child['start_date'] = date('Y-m-d', $firstDate); |
306 | 306 | $child['start'] = date('Y-m-d H:i:s', $firstDate); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | */ |
320 | 320 | private function findOutEndDates(&$node) |
321 | 321 | { |
322 | - $lastDate = $this->iterateNodes($node, 0, function (&$child, $lastDate) { |
|
322 | + $lastDate = $this->iterateNodes($node, 0, function(&$child, $lastDate) { |
|
323 | 323 | if (!empty($child['start_date']) && $child['start_date'] !== '1970-01-01') { |
324 | 324 | $taskDate = strtotime($child['end_date']); |
325 | 325 | if ($taskDate > $lastDate) { |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $node['end'] = $lastDate * 1000; |
337 | 337 | } |
338 | 338 | // iterate one more time setting up empty dates |
339 | - $this->iterateNodes($node, $lastDate, function (&$child, $lastDate) { |
|
339 | + $this->iterateNodes($node, $lastDate, function(&$child, $lastDate) { |
|
340 | 340 | if (empty($child['end_date'])) { |
341 | 341 | $child['end_date'] = date('Y-m-d', $lastDate); |
342 | 342 | $child['end'] = $lastDate * 1000; |
@@ -106,7 +106,7 @@ |
||
106 | 106 | * |
107 | 107 | * @param \App\Request $request |
108 | 108 | * |
109 | - * @return bool |
|
109 | + * @return boolean|null |
|
110 | 110 | */ |
111 | 111 | public function login(\App\Request $request) |
112 | 112 | { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * |
61 | 61 | * @param \App\Request $request |
62 | 62 | * |
63 | - * @return array - List of Vtiger_JsScript_Model instances |
|
63 | + * @return App\Controller\Vtiger_JsScript_Model[] - List of Vtiger_JsScript_Model instances |
|
64 | 64 | */ |
65 | 65 | public function getModalScripts(\App\Request $request) |
66 | 66 | { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * @param string $v2 |
61 | 61 | * @param string $operator |
62 | 62 | * |
63 | - * @return mixed |
|
63 | + * @return boolean |
|
64 | 64 | */ |
65 | 65 | public static function compare($v1, $v2, $operator = '==') |
66 | 66 | { |
@@ -271,7 +271,7 @@ |
||
271 | 271 | $requestUrl = (\App\RequestUtil::getBrowserInfo()->https ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; |
272 | 272 | try { |
273 | 273 | $request = Requests::get($requestUrl, [], ['timeout' => 1]); |
274 | - $headers = array_map(function ($value) { |
|
274 | + $headers = array_map(function($value) { |
|
275 | 275 | return is_array($value) ? strtolower(implode(',', $value)) : strtolower($value); |
276 | 276 | }, $request->headers->getAll()); |
277 | 277 | } catch (\Exception $exc) { |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | /** |
513 | 513 | * Get php.ini configuration. |
514 | 514 | * |
515 | - * @return array |
|
515 | + * @return string |
|
516 | 516 | */ |
517 | 517 | public static function getPhpIniConf() |
518 | 518 | { |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | /** |
542 | 542 | * Get php.ini configuration from CLI. |
543 | 543 | * |
544 | - * @return array |
|
544 | + * @return string |
|
545 | 545 | */ |
546 | 546 | public static function getPhpIniConfCron() |
547 | 547 | { |
@@ -1262,7 +1262,7 @@ |
||
1262 | 1262 | * Truncating HTML. |
1263 | 1263 | * |
1264 | 1264 | * @param $html |
1265 | - * @param int|bool $length |
|
1265 | + * @param integer $length |
|
1266 | 1266 | * @param bool $addDots |
1267 | 1267 | * |
1268 | 1268 | * @throws \HTMLPurifier_Exception |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if (isset($this->language)) { |
361 | 361 | Language::setTemporaryLanguage($this->language); |
362 | 362 | } |
363 | - $this->content = preg_replace_callback('/\$\((\w+) : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
363 | + $this->content = preg_replace_callback('/\$\((\w+) : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
364 | 364 | list(, $function, $params) = array_pad($matches, 3, ''); |
365 | 365 | if (in_array($function, static::$baseFunctions)) { |
366 | 366 | return $this->$function($params); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | if (isset($this->language)) { |
382 | 382 | Language::setTemporaryLanguage($this->language); |
383 | 383 | } |
384 | - $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
384 | + $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
385 | 385 | list(, $params) = array_pad($matches, 2, ''); |
386 | 386 | return $this->translate($params); |
387 | 387 | }, $this->content); |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | public function getGeneralVariable() |
1163 | 1163 | { |
1164 | 1164 | $variables = [ |
1165 | - 'LBL_ENTITY_VARIABLES' => array_map(function ($value) { |
|
1165 | + 'LBL_ENTITY_VARIABLES' => array_map(function($value) { |
|
1166 | 1166 | return Language::translate($value, 'Other.TextParser'); |
1167 | 1167 | }, array_flip(static::$variableGeneral)), |
1168 | 1168 | ]; |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | } |
1331 | 1331 | } |
1332 | 1332 | $generator = new \HTMLPurifier_Generator($config, new \HTMLPurifier_Context()); |
1333 | - $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function ($matches) { |
|
1333 | + $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function($matches) { |
|
1334 | 1334 | if (\in_array($matches[1], ['div'])) { |
1335 | 1335 | return "<{$matches[1]}></{$matches[1]}>"; |
1336 | 1336 | } |