@@ -103,12 +103,12 @@ |
||
103 | 103 | public function htmlToText(array &$item): void |
104 | 104 | { |
105 | 105 | if (false !== strpos($item['val'], '<b class="text-danger">')) { |
106 | - $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function ($match) { |
|
106 | + $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function($match) { |
|
107 | 107 | return "<light_red>{$match['1']}</light_red>"; |
108 | 108 | }, $item['val']); |
109 | 109 | } |
110 | 110 | if (false !== strpos($item['recommended'], '<b class="text-danger">')) { |
111 | - $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function ($match) { |
|
111 | + $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", function($match) { |
|
112 | 112 | return "<light_red>{$match['1']}</light_red>"; |
113 | 113 | }, $item['recommended']); |
114 | 114 | } |
@@ -140,7 +140,7 @@ |
||
140 | 140 | $viewer->assign('WIDGET', $widget); |
141 | 141 | $viewer->assign('MODULE_NAME', $moduleName); |
142 | 142 | $viewer->assign('DATA', $data); |
143 | - $viewer->assign('DTIME', implode(',', \App\Fields\Date::formatRangeToDisplay($time))); |
|
143 | + $viewer->assign('DTIME', implode(',', \App\Fields\Date::formatRangeToDisplay($time))); |
|
144 | 144 | $viewer->assign('COMPARE', $compare); |
145 | 145 | $viewer->assign('ACCESSIBLE_USERS', \App\Fields\Owner::getInstance('Accounts', $currentUserId)->getAccessibleUsersForModule()); |
146 | 146 | $viewer->assign('ACCESSIBLE_GROUPS', \App\Fields\Owner::getInstance('Accounts', $currentUserId)->getAccessibleGroupForModule()); |
@@ -16,9 +16,9 @@ |
||
16 | 16 | public function process(App\Request $request) |
17 | 17 | { |
18 | 18 | $recordModel = Settings_SlaPolicy_Record_Model::getInstanceById($request->getInteger('record')); |
19 | - $result = ['success' => true]; |
|
19 | + $result = ['success' => true]; |
|
20 | 20 | if ($recordModel) { |
21 | - $result = ['success' => (bool) $recordModel->delete()]; |
|
21 | + $result = ['success' => (bool) $recordModel->delete()]; |
|
22 | 22 | } |
23 | 23 | $response = new Vtiger_Response(); |
24 | 24 | $response->setResult($result); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | 'default_host' => [ |
10 | 10 | 'default' => ['ssl://imap.gmail.com' => 'ssl://imap.gmail.com'], |
11 | 11 | 'description' => 'Default host.', |
12 | - 'validation' => function () { |
|
12 | + 'validation' => function() { |
|
13 | 13 | $arg = func_get_arg(0); |
14 | 14 | if (!$arg) { |
15 | 15 | return false; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | } |
23 | 23 | return true; |
24 | 24 | }, |
25 | - 'sanitization' => function () { |
|
25 | + 'sanitization' => function() { |
|
26 | 26 | $values = func_get_arg(0); |
27 | 27 | if (!\is_array($values)) { |
28 | 28 | $values = [$values]; |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | 'default' => 993, |
40 | 40 | 'description' => 'Port used to connect to IMAP.', |
41 | 41 | 'validation' => '\App\Validator::port', |
42 | - 'sanitization' => function () { |
|
42 | + 'sanitization' => function() { |
|
43 | 43 | return (int) func_get_arg(0); |
44 | 44 | } |
45 | 45 | ], |
46 | 46 | 'smtp_server' => [ |
47 | 47 | 'default' => 'ssl://smtp.gmail.com', |
48 | 48 | 'description' => 'Name of SMTP server', |
49 | - 'validation' => function () { |
|
49 | + 'validation' => function() { |
|
50 | 50 | $arg = func_get_arg(0); |
51 | 51 | return $arg && \App\Purifier::purify($arg); |
52 | 52 | }, |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | 'default' => 465, |
57 | 57 | 'description' => 'Default smtp port', |
58 | 58 | 'validation' => '\App\Validator::port', |
59 | - 'sanitization' => function () { |
|
59 | + 'sanitization' => function() { |
|
60 | 60 | return (int) func_get_arg(0); |
61 | 61 | } |
62 | 62 | ], |
63 | 63 | 'username_domain' => [ |
64 | 64 | 'default' => 'gmail.com', |
65 | 65 | 'description' => 'User name domain', |
66 | - 'validation' => function () { |
|
66 | + 'validation' => function() { |
|
67 | 67 | $arg = func_get_arg(0); |
68 | 68 | return '' === $arg || \App\Validator::domain($arg); |
69 | 69 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'smtp_user' => [ |
88 | 88 | 'default' => '%u', |
89 | 89 | 'description' => 'Login to SMTP server', |
90 | - 'validation' => function () { |
|
90 | + 'validation' => function() { |
|
91 | 91 | $arg = func_get_arg(0); |
92 | 92 | return $arg && !is_numeric($arg) && \is_string($arg) && $arg === strip_tags($arg) && 256 > \App\TextParser::getTextLength($arg); |
93 | 93 | }, |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | 'smtp_pass' => [ |
97 | 97 | 'default' => '%p', |
98 | 98 | 'description' => "SMTP password (if required) if you use %p as the password Roundcube will use the current user's password for login", |
99 | - 'validation' => function () { |
|
99 | + 'validation' => function() { |
|
100 | 100 | $arg = func_get_arg(0); |
101 | 101 | return !empty($arg) && 256 > \App\TextParser::getTextLength($arg); |
102 | 102 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'language' => [ |
105 | 105 | 'default' => 'en_US', |
106 | 106 | 'description' => 'Set default language', |
107 | - 'validation' => function () { |
|
107 | + 'validation' => function() { |
|
108 | 108 | $arg = func_get_arg(0); |
109 | 109 | return $arg && \in_array($arg, \Settings_OSSMail_Config_Model::LANGUAGES); |
110 | 110 | } |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | 'skin_logo' => [ |
113 | 113 | 'default' => '/images/null.png', |
114 | 114 | 'description' => 'Skin logo', |
115 | - 'validation' => function () { |
|
115 | + 'validation' => function() { |
|
116 | 116 | $arg = func_get_arg(0); |
117 | 117 | return !empty($arg) && \App\Purifier::purify($arg); |
118 | 118 | }, |
119 | - 'sanitization' => function () { |
|
119 | + 'sanitization' => function() { |
|
120 | 120 | $arg = func_get_arg(0); |
121 | 121 | return ['*' => \App\Purifier::encodeHtml($arg)]; |
122 | 122 | } |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | 'identities_level' => [ |
137 | 137 | 'default' => 0, |
138 | 138 | 'description' => 'Identities level.', |
139 | - 'validation' => function () { |
|
139 | + 'validation' => function() { |
|
140 | 140 | $arg = func_get_arg(0); |
141 | 141 | return is_numeric($arg) && \in_array($arg, [0, 1, 2, 3, 4]); |
142 | 142 | }, |
143 | - 'sanitization' => function () { |
|
143 | + 'sanitization' => function() { |
|
144 | 144 | return (int) func_get_arg(0); |
145 | 145 | } |
146 | 146 | ], |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | 'default' => 30, |
149 | 149 | 'description' => 'Session lifetime in minutes', |
150 | 150 | 'validation' => '\App\Validator::naturalNumber', |
151 | - 'sanitization' => function () { |
|
151 | + 'sanitization' => function() { |
|
152 | 152 | return (int) func_get_arg(0); |
153 | 153 | } |
154 | 154 | ], |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | 'useragent' => [ |
354 | 354 | 'default' => 'YetiForce Webmail', |
355 | 355 | 'description' => 'Add this user-agent to message headers when sending', |
356 | - 'validation' => function () { |
|
356 | + 'validation' => function() { |
|
357 | 357 | $arg = func_get_arg(0); |
358 | 358 | return $arg && \App\Purifier::purify($arg); |
359 | 359 | }, |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $dbCommand->insert('vtiger_senotesrel', ['crmid' => $id, 'notesid' => $documentId])->execute(); |
76 | 76 | } |
77 | 77 | $dataReader->close(); |
78 | - unset($dataReader,$query, $dbCommand, $recordModel); |
|
78 | + unset($dataReader, $query, $dbCommand, $recordModel); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 |
@@ -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); |
@@ -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 | } |