@@ -615,7 +615,7 @@ |
||
| 615 | 615 | 'or', |
| 616 | 616 | ['like', 'position', "\"$fingerPrint\""], |
| 617 | 617 | ['like', 'size', "\"$fingerPrint\""], |
| 618 | - ], )->createCommand()->query(); |
|
| 618 | + ],)->createCommand()->query(); |
|
| 619 | 619 | |
| 620 | 620 | $createCommand = \App\Db::getInstance()->createCommand(); |
| 621 | 621 | while ($row = $dataReader->read()) { |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | * |
| 194 | 194 | * @param Vtiger_PDF_Model $pdfModel |
| 195 | 195 | */ |
| 196 | - public static function transformAdvanceFilterToWorkFlowFilter(Vtiger_PDF_Model &$pdfModel) |
|
| 196 | + public static function transformAdvanceFilterToWorkFlowFilter(Vtiger_PDF_Model & $pdfModel) |
|
| 197 | 197 | { |
| 198 | 198 | $conditions = $pdfModel->get('conditions'); |
| 199 | 199 | $wfCondition = []; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'DASHBOARD_CALENDAR_WIDGET_FILTER_TYPE' => [ |
| 34 | 34 | 'default' => 'list', |
| 35 | 35 | 'description' => 'Shows the switch button or filter list in the calendar widget: switch - Switch "To realize" and "History", list - filter list', |
| 36 | - 'validation' => function () { |
|
| 36 | + 'validation' => function() { |
|
| 37 | 37 | $arg = func_get_arg(0); |
| 38 | 38 | return 'list' === $arg || 'switch' === $arg; |
| 39 | 39 | }, |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | 'SHOW_QUICK_CREATE_BY_STATUS' => [ |
| 42 | 42 | 'default' => [], |
| 43 | 43 | 'description' => 'Show the Calendar quick create window after changing the status: array - PLL_COMPLETED, PLL_CANCELLED', |
| 44 | - 'validation' => function () { |
|
| 44 | + 'validation' => function() { |
|
| 45 | 45 | $arg = func_get_arg(0); |
| 46 | 46 | return \is_array($arg) && empty(array_diff($arg, ['PLL_COMPLETED', 'PLL_CANCELLED'])); |
| 47 | 47 | }, |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'HIDDEN_DAYS_IN_CALENDAR_VIEW' => [ |
| 68 | 68 | 'default' => [0, 6], |
| 69 | 69 | 'description' => 'Exclude certain days-of-the-week from being displayed. The value is an array of day-of-week indices to hide. Each index is zero-base (Sunday=0) and ranges from 0-6. By default, no days are hidden', |
| 70 | - 'validation' => function () { |
|
| 70 | + 'validation' => function() { |
|
| 71 | 71 | $arg = func_get_arg(0); |
| 72 | 72 | return 'Extended' === $arg || 'Standard' === $arg; |
| 73 | 73 | }, |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | 'default' => 5000, |
| 95 | 95 | 'description' => 'Max number of records to update status in cron', |
| 96 | 96 | 'validation' => '\App\Validator::naturalNumber', |
| 97 | - 'sanitization' => function () { |
|
| 97 | + 'sanitization' => function() { |
|
| 98 | 98 | return (int) func_get_arg(0); |
| 99 | 99 | }, |
| 100 | 100 | ], |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'CALENDAR_VIEW' => [ |
| 108 | 108 | 'default' => 'Extended', |
| 109 | 109 | 'description' => 'Calendar view - allowed values: Extended, Standard, refresh menu files after you change this value', |
| 110 | - 'validation' => function () { |
|
| 110 | + 'validation' => function() { |
|
| 111 | 111 | $arg = func_get_arg(0); |
| 112 | 112 | return 'Extended' === $arg || 'Standard' === $arg; |
| 113 | 113 | }, |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $recepient = $textParser->setContent($this->sms_recepient)->parse()->getContent(); |
| 41 | 41 | $recepients = array_unique(explode(',', $recepient)); |
| 42 | 42 | foreach ($recepients as $phoneNumber) { |
| 43 | - $phoneNumber = preg_replace_callback('/[^\d\+]/s', function () { |
|
| 43 | + $phoneNumber = preg_replace_callback('/[^\d\+]/s', function() { |
|
| 44 | 44 | return ''; |
| 45 | 45 | }, strip_tags($phoneNumber)); |
| 46 | 46 | if ($phoneNumber) { |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | */ |
| 79 | 79 | public function setPhone(string $phoneNumber): self |
| 80 | 80 | { |
| 81 | - $phoneNumber = preg_replace_callback('/[^\d]/s', function () { |
|
| 81 | + $phoneNumber = preg_replace_callback('/[^\d]/s', function() { |
|
| 82 | 82 | return ''; |
| 83 | 83 | }, $phoneNumber); |
| 84 | 84 | $this->set('to', $phoneNumber); |
@@ -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']) && '1970-01-01' !== $child['start_date']) { |
| 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']) || '1970-01-01' === $child['start_date']) { |
| 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']) && '1970-01-01' !== $child['start_date']) { |
| 324 | 324 | $taskDate = strtotime($child['end_date']); |
| 325 | 325 | if ($taskDate > $lastDate) { |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $node['end'] = $lastDate; |
| 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; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | 'default' => 50, |
| 16 | 16 | 'description' => 'Max depth of hierarchy', |
| 17 | 17 | 'validation' => '\App\Validator::naturalNumber', |
| 18 | - 'sanitization' => function () { |
|
| 18 | + 'sanitization' => function() { |
|
| 19 | 19 | return (int) func_get_arg(0); |
| 20 | 20 | }, |
| 21 | 21 | ], |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | 'defaultViewName' => [ |
| 35 | 35 | 'default' => 'List', |
| 36 | 36 | 'description' => 'Default module view. Values: List, ListPreview, DashBoard or Tiles, refresh menu files after you change this value', |
| 37 | - 'validation' => function () { |
|
| 37 | + 'validation' => function() { |
|
| 38 | 38 | $arg = func_get_arg(0); |
| 39 | 39 | return 'List' === $arg || 'ListPreview' === $arg || 'DashBoard' === $arg || 'Tiles' === $arg; |
| 40 | 40 | }, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'defaultDetailViewName' => [ |
| 43 | 43 | 'default' => 'full', |
| 44 | 44 | 'description' => 'Default record view for list preview. Values: full or summary', |
| 45 | - 'validation' => function () { |
|
| 45 | + 'validation' => function() { |
|
| 46 | 46 | $arg = func_get_arg(0); |
| 47 | 47 | return 'full' === $arg || 'summary' === $arg; |
| 48 | 48 | }, |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | if (\App\Cache::has($cacheName, '')) { |
| 316 | 316 | return \App\Cache::get($cacheName, ''); |
| 317 | 317 | } |
| 318 | - $allModules = array_map(function ($v) { |
|
| 318 | + $allModules = array_map(function($v) { |
|
| 319 | 319 | return 0 > $v ? 999 : sprintf('%03d', $v); |
| 320 | 320 | }, array_column(\vtlib\Functions::getAllModules(false, true), 'tabsequence', 'name')); |
| 321 | 321 | $excludedModules = ['ModComments']; |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | $separator = '-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-'; |
| 286 | 286 | $value = (string) $this->vcomponent->{$davName}; |
| 287 | 287 | if (false !== strpos($value, $separator)) { |
| 288 | - [$html,$text] = explode($separator, $value, 2); |
|
| 288 | + [$html, $text] = explode($separator, $value, 2); |
|
| 289 | 289 | $value = trim(strip_tags($html)) . "\n" . \trim(\str_replace($separator, '', $text)); |
| 290 | 290 | } else { |
| 291 | 291 | $value = trim(\str_replace('\n', PHP_EOL, $value)); |
@@ -448,14 +448,14 @@ discard block |
||
| 448 | 448 | $currentUser = \App\User::getCurrentUserModel(); |
| 449 | 449 | $userTimeZone = new \DateTimeZone($currentUser->getDetail('time_zone')); |
| 450 | 450 | $sysTimeZone = new \DateTimeZone(\App\Fields\DateTime::getTimeZone()); |
| 451 | - [$hour , $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
| 451 | + [$hour, $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
| 452 | 452 | $date = new \DateTime('now', $userTimeZone); |
| 453 | 453 | $date->setTime($hour, $minute); |
| 454 | 454 | $date->setTimezone($sysTimeZone); |
| 455 | 455 | $timeStart = $date->format('H:i:s'); |
| 456 | 456 | |
| 457 | 457 | $date->setTimezone($userTimeZone); |
| 458 | - [$hour , $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
| 458 | + [$hour, $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
| 459 | 459 | $date->setTime($hour, $minute); |
| 460 | 460 | $date->setTimezone($sysTimeZone); |
| 461 | 461 | $timeEnd = $date->format('H:i:s'); |