@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $numberSelected = false; |
| 48 | 48 | foreach ($phoneFieldList as $fieldName) { |
| 49 | 49 | if (!empty($row[$fieldName])) { |
| 50 | - $toNumbers[] = preg_replace_callback('/[^\d]/s', function ($m) { |
|
| 50 | + $toNumbers[] = preg_replace_callback('/[^\d]/s', function($m) { |
|
| 51 | 51 | return ''; |
| 52 | 52 | }, $row[$fieldName]); |
| 53 | 53 | $numberSelected = true; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | } |
| 79 | 79 | if (!empty($this->searchValue)) { |
| 80 | 80 | $this->searchValue = strtolower($this->searchValue); |
| 81 | - $accessibleGroups = array_filter($accessibleGroups, function ($name) { |
|
| 81 | + $accessibleGroups = array_filter($accessibleGroups, function($name) { |
|
| 82 | 82 | return strstr(strtolower($name), $this->searchValue); |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -253,7 +253,7 @@ |
||
| 253 | 253 | */ |
| 254 | 254 | public function getGroupNames() |
| 255 | 255 | { |
| 256 | - return array_filter(\App\Fields\Owner::getInstance('CustomView')->getGroups(false), function ($key) { |
|
| 256 | + return array_filter(\App\Fields\Owner::getInstance('CustomView')->getGroups(false), function($key) { |
|
| 257 | 257 | return \in_array($key, $this->getGroups()); |
| 258 | 258 | }, ARRAY_FILTER_USE_KEY); |
| 259 | 259 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | 'SHOW_RELATION_IN_MODAL' => [ |
| 17 | 17 | 'default' => ['relationField' => 'parent_id', 'module' => 'Accounts', 'relatedModule' => ['FInvoice', 'ModComments', 'Calendar', 'Documents']], |
| 18 | 18 | 'description' => 'Show relations in the modal', |
| 19 | - 'validation' => function () { |
|
| 19 | + 'validation' => function() { |
|
| 20 | 20 | return false; |
| 21 | 21 | } |
| 22 | 22 | ], |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'SHOW_HIERARCHY_IN_MODAL' => [ |
| 29 | 29 | 'default' => [], |
| 30 | 30 | 'description' => 'false, [] - inherit fields, [ label => column name, .. ]', |
| 31 | - 'validation' => function () { |
|
| 31 | + 'validation' => function() { |
|
| 32 | 32 | $args = func_get_arg(0); |
| 33 | 33 | $moduleModel = Vtiger_Module_Model::getInstance('Assets'); |
| 34 | 34 | $fields = $moduleModel->getFields(); |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | $columnNames = self::getColumnNames(); |
| 135 | 135 | unset($columnNames[array_search('id', $columnNames)]); |
| 136 | 136 | $editFields = array_keys(self::$formFields); |
| 137 | - usort($columnNames, function ($a, $b) use ($editFields) { |
|
| 137 | + usort($columnNames, function($a, $b) use ($editFields) { |
|
| 138 | 138 | return array_search($a, $editFields) < array_search($b, $editFields) ? -1 : 1; |
| 139 | 139 | }); |
| 140 | 140 | return $columnNames; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | 'default' => 50, |
| 15 | 15 | 'description' => 'Max depth of hierarchy', |
| 16 | 16 | 'validation' => '\App\Validator::naturalNumber', |
| 17 | - 'sanitization' => function () { |
|
| 17 | + 'sanitization' => function() { |
|
| 18 | 18 | return (int) func_get_arg(0); |
| 19 | 19 | } |
| 20 | 20 | ], |
@@ -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 * 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; |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | if (false === $returnedValue) { |
| 329 | 329 | \App\Log::warning( |
| 330 | 330 | "There is no rule defined for this case recordId: {$recordId} module: {$this->sourceModuleName}. Statuses:" . |
| 331 | - implode(',', array_map(function ($item) { |
|
| 331 | + implode(',', array_map(function($item) { |
|
| 332 | 332 | return $item['status']; |
| 333 | 333 | }, $itmes)) |
| 334 | 334 | ); |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | $html .= "<hr><strong>$type</strong><ul>"; |
| 35 | 35 | foreach ($entries[$typeId] as $notification) { |
| 36 | 36 | $title = preg_replace_callback( |
| 37 | - $pattern, function ($matches) { |
|
| 37 | + $pattern, function($matches) { |
|
| 38 | 38 | return \App\Config::main('site_URL') . $matches[0]; |
| 39 | 39 | }, $notification->getTitle()); |
| 40 | 40 | $massage = preg_replace_callback( |
| 41 | - $pattern, function ($matches) { |
|
| 41 | + $pattern, function($matches) { |
|
| 42 | 42 | return \App\Config::main('site_URL') . $matches[0]; |
| 43 | 43 | }, $notification->getMessage()); |
| 44 | 44 | $html .= "<li>$title<br />$massage</li>"; |