@@ -115,11 +115,11 @@ |
||
115 | 115 | self::$users['assignUserYes2'] = self::createUserRecord('assignUserYes2', ['available' => '1', 'auto_assign' => '1']); |
116 | 116 | self::$defaultUser = self::createUserRecord('assignUserDefault'); |
117 | 117 | |
118 | - self::$autoAssignUsers = array_filter(array_map(function ($userModel) { |
|
118 | + self::$autoAssignUsers = array_filter(array_map(function($userModel) { |
|
119 | 119 | return $userModel->get('auto_assign') ? $userModel->getId() : null; |
120 | 120 | }, self::$users)); |
121 | 121 | |
122 | - $members = array_map(function ($userModel) { |
|
122 | + $members = array_map(function($userModel) { |
|
123 | 123 | return \App\PrivilegeUtil::MEMBER_TYPE_USERS . ':' . $userModel->getId(); |
124 | 124 | }, self::$users); |
125 | 125 |
@@ -183,7 +183,7 @@ |
||
183 | 183 | public function positions(App\Request $request): void |
184 | 184 | { |
185 | 185 | $currentUserId = App\User::getCurrentUserId(); |
186 | - if ($positionsMap = $request->getMultiDimensionArray('position', [['row' => 'Integer', 'col' => 'Integer']])) { |
|
186 | + if ($positionsMap = $request->getMultiDimensionArray('position', [['row' => 'Integer', 'col' => 'Integer']])) { |
|
187 | 187 | foreach ($positionsMap as $id => $position) { |
188 | 188 | [$linkId, $widgetId] = array_pad(explode('-', $id), 2, false); |
189 | 189 | if ($widgetId) { |
@@ -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 = []; |
@@ -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 | }, |
@@ -150,7 +150,7 @@ |
||
150 | 150 | public function getFieldInstanceByName($name) |
151 | 151 | { |
152 | 152 | $moduleName = $this->getName(true); |
153 | - $params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main']; |
|
153 | + $params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main']; |
|
154 | 154 | switch ($name) { |
155 | 155 | case 'MAX_NUMBER_EXPORT_RECORDS': |
156 | 156 | $params['label'] = $this->performanceFields[$name]; |
@@ -79,7 +79,7 @@ |
||
79 | 79 | } |
80 | 80 | $customViewData['columnslist'] = $selectedColumnsList; |
81 | 81 | $customFieldNames = $request->getArray('customFieldNames', 'Text'); |
82 | - array_walk($customFieldNames, function (&$customLabel) { |
|
82 | + array_walk($customFieldNames, function(&$customLabel) { |
|
83 | 83 | $customLabel = \App\Purifier::decodeHtml(trim($customLabel)); |
84 | 84 | }); |
85 | 85 | $customViewData['customFieldNames'] = $customFieldNames; |
@@ -144,7 +144,7 @@ |
||
144 | 144 | $dataReader = (new App\Db\Query())->from('s_#__picklist_dependency_data')->where(['id' => $this->getId()])->createCommand()->query(); |
145 | 145 | $this->mapping = []; |
146 | 146 | while ($row = $dataReader->read()) { |
147 | - ['source_id' => $sourceId,'conditions' => $conditions] = $row; |
|
147 | + ['source_id' => $sourceId, 'conditions' => $conditions] = $row; |
|
148 | 148 | $this->mapping[$sourceId] = $conditions; |
149 | 149 | } |
150 | 150 | $dataReader->close(); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | 'modulesListQuickCreate' => [ |
11 | 11 | 'default' => [], |
12 | 12 | 'description' => 'Quick creation of records in the module list', |
13 | - 'validation' => function () { |
|
13 | + 'validation' => function() { |
|
14 | 14 | $arg = func_get_arg(0); |
15 | 15 | return \is_array($arg) && !array_diff($arg, App\Module::getAllModuleNames()); |
16 | 16 | } |