@@ -186,7 +186,7 @@ |
||
186 | 186 | return ''; |
187 | 187 | } |
188 | 188 | $teaser = $css = $btn = ''; |
189 | - $btnTemplate = function (string $popoverText = '', ?string $btnClass = ''): string { |
|
189 | + $btnTemplate = function(string $popoverText = '', ?string $btnClass = ''): string { |
|
190 | 190 | $popoverText = \App\Language::translate($popoverText); |
191 | 191 | return "<a href=\"#\" class=\"js-more noLinkBtn font-weight-lighter js-popover-tooltip {$btnClass}\" data-iframe=\"true\" data-content=\"{$popoverText}\"><span class=\"mdi mdi-overscan\"></span></a>"; |
192 | 192 | }; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $viewer->assign('WID', ''); |
61 | 61 | $viewer->assign('WIDGETINFO', [ |
62 | 62 | 'data' => [ |
63 | - 'limit' => 5, 'relatedmodule' => '', 'columns' => '', |
|
63 | + 'limit' => 5, 'relatedmodule' => '', 'columns' => '', |
|
64 | 64 | 'action' => '', 'switchHeader' => '', 'filter' => '', |
65 | 65 | 'checkbox' => '', 'customView' => '[]', |
66 | 66 | ], |
@@ -195,7 +195,7 @@ |
||
195 | 195 | stream_context_set_option($this->streamContext, ['http' => ['header' => 'sid: ' . $this->sessionId]]); |
196 | 196 | $this->__setSoapHeaders(); |
197 | 197 | $this->__setSoapHeaders($header); |
198 | - $result = $this->DaneSzukajPodmioty(['pParametryWyszukiwania' => ['Nip' => $vatId, 'Krs' => $ncr, 'Regon' => $taxNumber]]); |
|
198 | + $result = $this->DaneSzukajPodmioty(['pParametryWyszukiwania' => ['Nip' => $vatId, 'Krs' => $ncr, 'Regon' => $taxNumber]]); |
|
199 | 199 | $response = $this->parseResponse($result->DaneSzukajPodmiotyResult); |
200 | 200 | foreach ($response as &$info) { |
201 | 201 | $this->getAdvanceData($info); |
@@ -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 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function testGetPicklistValue() |
48 | 48 | { |
49 | - \App\Db::getInstance()->createCommand()->insert('vtiger_activitytype', ['activitytype' => 'UnitTestCalendar', 'presence' => 1, 'sortorderid' => 99, 'color' => 'A0B584'])->execute(); |
|
49 | + \App\Db::getInstance()->createCommand()->insert('vtiger_activitytype', ['activitytype' => 'UnitTestCalendar', 'presence' => 1, 'sortorderid' => 99, 'color' => 'A0B584'])->execute(); |
|
50 | 50 | \App\Cache::clear(); |
51 | 51 | $this->assertGreaterThan(0, (\count(\Settings_Calendar_Module_Model::getPicklistValue())), 'Calendar activity type picklist is empty'); |
52 | 52 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | \App\Process::$requestMode = 'Cli'; |
15 | 15 | |
16 | -set_error_handler(function ($errNo, $errStr, $errFile, $errLine) { |
|
16 | +set_error_handler(function($errNo, $errStr, $errFile, $errLine) { |
|
17 | 17 | if (\in_array($errNo, [E_ERROR, E_WARNING, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR])) { |
18 | 18 | throw new \Exception($errNo . ': ' . $errStr . ' in ' . $errFile . ', line ' . $errLine); |
19 | 19 | } |
@@ -1261,7 +1261,7 @@ |
||
1261 | 1261 | if (isset($history[$value]) && (!isset($locks[$fieldName]) || !\in_array($value, $locks[$fieldName]))) { |
1262 | 1262 | $history[$value]['time'] += \App\Fields\DateTime::getDiff($history[$value]['date'], date('Y-m-d H:i:s'), 'minutes'); |
1263 | 1263 | } |
1264 | - uasort($history, function ($a, $b) { |
|
1264 | + uasort($history, function($a, $b) { |
|
1265 | 1265 | return strnatcmp($b['date'], $a['date']); |
1266 | 1266 | }); |
1267 | 1267 | $viewer = $this->getViewer($request); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | */ |
72 | 72 | public function preProcess(): bool |
73 | 73 | { |
74 | - register_shutdown_function(function () { |
|
74 | + register_shutdown_function(function() { |
|
75 | 75 | if ($error = error_get_last()) { |
76 | 76 | $this->errorHandler($error['type'], $error['message'], $error['file'], $error['line']); |
77 | 77 | } |
@@ -133,13 +133,13 @@ |
||
133 | 133 | public function generateRoomName(string $prefix = ''): string |
134 | 134 | { |
135 | 135 | $prefix = preg_replace_callback_array([ |
136 | - '/[^a-z0-9 ]/' => function () { |
|
136 | + '/[^a-z0-9 ]/' => function() { |
|
137 | 137 | return ''; |
138 | 138 | }, |
139 | - '/\b[a-z]/' => function ($matches) { |
|
139 | + '/\b[a-z]/' => function($matches) { |
|
140 | 140 | return mb_strtoupper($matches[0]); |
141 | 141 | }, |
142 | - '/[\s]/' => function () { |
|
142 | + '/[\s]/' => function() { |
|
143 | 143 | return ''; |
144 | 144 | }, |
145 | 145 | ], strtolower(\App\Utils::sanitizeSpecialChars($prefix, ' '))); |