Passed
Pull Request — developer (#15979)
by Arkadiusz
18:25
created
modules/Settings/PublicHoliday/actions/Holiday.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,8 +132,7 @@  discard block
 block discarded – undo
132 132
 				$recordModel = Settings_PublicHoliday_Record_Model::getInstanceById((int) $id);
133 133
 				$deleteResult = $recordModel->delete();
134 134
 				$message = 0 === $deleteResult ?
135
-									\App\Language::translate('LBL_HOLIDAY_DELETE_ALREADYDELETED', $moduleName) :
136
-									\App\Language::translate('LBL_HOLIDAY_DELETE_OK', $moduleName);
135
+									\App\Language::translate('LBL_HOLIDAY_DELETE_ALREADYDELETED', $moduleName) : \App\Language::translate('LBL_HOLIDAY_DELETE_OK', $moduleName);
137 136
 			} else {
138 137
 				$result = false;
139 138
 				$message = \App\Language::translate('LBL_HOLIDAY_DELETE_NOTHINGTODELETE', $moduleName);
@@ -168,8 +167,7 @@  discard block
 block discarded – undo
168 167
 					$deletedRecords += $recordModel->delete();
169 168
 				}
170 169
 				$message = $deletedRecords === \count($records) ?
171
-									\App\Language::translate('LBL_HOLIDAY_DELETE_OK', $moduleName) :
172
-									\App\Language::translate('LBL_HOLIDAY_DELETE_SOMENOTDELETED', $moduleName);
170
+									\App\Language::translate('LBL_HOLIDAY_DELETE_OK', $moduleName) : \App\Language::translate('LBL_HOLIDAY_DELETE_SOMENOTDELETED', $moduleName);
173 171
 			} else {
174 172
 				$result = false;
175 173
 				$message = \App\Language::translate('LBL_HOLIDAY_DELETE_NOTHINGTODELETE', $moduleName);
Please login to merge, or discard this patch.
modules/Settings/MailRbl/actions/GetData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	{
64 64
 		$rows = [];
65 65
 		$query = $this->getQuery($request);
66
-		$query->from('s_#__mail_rbl_request')->select(['id',  'type', 'datetime', 'user', 'header']);
66
+		$query->from('s_#__mail_rbl_request')->select(['id', 'type', 'datetime', 'user', 'header']);
67 67
 		$query->andWhere(['status' => 0]);
68 68
 		$dataReader = $query->createCommand(\App\Db::getInstance('admin'))->query();
69 69
 		while ($row = $dataReader->read()) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	{
100 100
 		$rows = [];
101 101
 		$query = $this->getQuery($request);
102
-		$query->from('s_#__mail_rbl_request')->select(['id',  'type', 'datetime', 'user', 'header']);
102
+		$query->from('s_#__mail_rbl_request')->select(['id', 'type', 'datetime', 'user', 'header']);
103 103
 		$query->andWhere(['status' => 1]);
104 104
 		$dataReader = $query->createCommand(\App\Db::getInstance('admin'))->query();
105 105
 		while ($row = $dataReader->read()) {
Please login to merge, or discard this patch.
modules/Vtiger/models/QuickCreateRecordStructure.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 				$fieldModel->set('isMandatory', true);
60 60
 			}
61 61
 			$this->structuredValues[$fieldName] = $fieldModel;
62
-		}
63
-		++Vtiger_Field_Model::$tabIndexLastSeq;
62
+		}++Vtiger_Field_Model::$tabIndexLastSeq;
64 63
 		return $this->structuredValues;
65 64
 	}
66 65
 }
Please login to merge, or discard this patch.
app/Cli/System.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	 */
30 30
 	public function history(): void
31 31
 	{
32
-		$table = array_map(function ($item) {
32
+		$table = array_map(function($item) {
33 33
 			$item['result'] = $item['result'] ? 'OK' : 'Error';
34 34
 			unset($item['id']);
35 35
 			return $item;
Please login to merge, or discard this patch.
app/Cli/Environment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
modules/SSalesProcesses/dashboards/TeamsEstimatedSales.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
modules/Settings/SlaPolicy/actions/DeleteAjax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
modules/OSSMail/ConfigTemplate.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		},
Please login to merge, or discard this patch.
app/Mail/ScannerAction/CreatedHelpDesk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.