Passed
Pull Request — developer (#15265)
by Arkadiusz
20:15
created
app/Field.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,43 +21,43 @@
 block discarded – undo
21 21
 	const SYSTEM_FIELDS = [
22 22
 		'assigned_user_id' => [
23 23
 			'validationConditions' => ['name'],
24
-			'name' => 'assigned_user_id',	'column' => 'smownerid',	'label' => 'Assigned To',	'table' => 'vtiger_crmentity',
25
-			'uitype' => 53,	'typeofdata' => 'V~M',	'maximumlength' => 65535,
24
+			'name' => 'assigned_user_id', 'column' => 'smownerid', 'label' => 'Assigned To', 'table' => 'vtiger_crmentity',
25
+			'uitype' => 53, 'typeofdata' => 'V~M', 'maximumlength' => 65535,
26 26
 		],
27 27
 		'createdtime' => [
28 28
 			'validationConditions' => ['name'],
29
-			'name' => 'createdtime',	'column' => 'createdtime',	'label' => 'Created Time',	'table' => 'vtiger_crmentity',
30
-			'uitype' => 70,	'typeofdata' => 'DT~O',	'displaytype' => 2,	'maximumlength' => 65535,
29
+			'name' => 'createdtime', 'column' => 'createdtime', 'label' => 'Created Time', 'table' => 'vtiger_crmentity',
30
+			'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535,
31 31
 		],
32 32
 		'modifiedtime' => [
33 33
 			'validationConditions' => ['name'],
34
-			'name' => 'modifiedtime',	'column' => 'modifiedtime',	'label' => 'Modified Time',	'table' => 'vtiger_crmentity',
35
-			'uitype' => 70,	'typeofdata' => 'DT~O',	'displaytype' => 2,	'maximumlength' => 65535,
34
+			'name' => 'modifiedtime', 'column' => 'modifiedtime', 'label' => 'Modified Time', 'table' => 'vtiger_crmentity',
35
+			'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535,
36 36
 		],
37 37
 		'created_user_id' => [
38 38
 			'validationConditions' => ['column'],
39
-			'name' => 'created_user_id',	'column' => 'smcreatorid',	'label' => 'Created By',	'table' => 'vtiger_crmentity',
40
-			'uitype' => 52,	'typeofdata' => 'V~O',	'displaytype' => 2,	'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535,
39
+			'name' => 'created_user_id', 'column' => 'smcreatorid', 'label' => 'Created By', 'table' => 'vtiger_crmentity',
40
+			'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535,
41 41
 		],
42 42
 		'modifiedby' => [
43 43
 			'validationConditions' => ['name'],
44
-			'name' => 'modifiedby',	'column' => 'modifiedby',	'label' => 'Last Modified By',	'table' => 'vtiger_crmentity',
45
-			'uitype' => 52,	'typeofdata' => 'V~O',	'displaytype' => 2,	'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535,
44
+			'name' => 'modifiedby', 'column' => 'modifiedby', 'label' => 'Last Modified By', 'table' => 'vtiger_crmentity',
45
+			'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535,
46 46
 		],
47 47
 		'shownerid' => [
48 48
 			'validationConditions' => ['name'],
49
-			'name' => 'shownerid',	'column' => 'shownerid',	'label' => 'Share with users',	'table' => 'vtiger_crmentity',
50
-			'uitype' => 120,	'typeofdata' => 'V~O',	'columntype' => 'int(11)', 'maximumlength' => 65535,
49
+			'name' => 'shownerid', 'column' => 'shownerid', 'label' => 'Share with users', 'table' => 'vtiger_crmentity',
50
+			'uitype' => 120, 'typeofdata' => 'V~O', 'columntype' => 'int(11)', 'maximumlength' => 65535,
51 51
 		],
52 52
 		'private' => [
53 53
 			'validationConditions' => ['name'],
54
-			'name' => 'private',	'column' => 'private',	'label' => 'FL_IS_PRIVATE',	'table' => 'vtiger_crmentity',
55
-			'uitype' => 56,	'typeofdata' => 'C~O',	'columntype' => 'int(11)', 'maximumlength' => '-128,127',
54
+			'name' => 'private', 'column' => 'private', 'label' => 'FL_IS_PRIVATE', 'table' => 'vtiger_crmentity',
55
+			'uitype' => 56, 'typeofdata' => 'C~O', 'columntype' => 'int(11)', 'maximumlength' => '-128,127',
56 56
 		],
57 57
 		'share_externally' => [
58 58
 			'validationConditions' => ['uitype', 'fieldparams'],
59
-			'name' => 'share_externally',	'column' => 'share_externally',	'label' => 'FL_SHARE_EXTERNALLY',	'defaultvalue' => 1,	'fieldparams' => 1,
60
-			'uitype' => 318,	'typeofdata' => 'C~O',	'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127',
59
+			'name' => 'share_externally', 'column' => 'share_externally', 'label' => 'FL_SHARE_EXTERNALLY', 'defaultvalue' => 1, 'fieldparams' => 1,
60
+			'uitype' => 318, 'typeofdata' => 'C~O', 'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127',
61 61
 		],
62 62
 	];
63 63
 
Please login to merge, or discard this patch.
cli.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
app/TextParser.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -448,13 +448,13 @@  discard block
 block discarded – undo
448 448
 	public function parseData(string $content)
449 449
 	{
450 450
 		if ($this->useExtension) {
451
-			$content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function ($matches) {
451
+			$content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function($matches) {
452 452
 				return $matches[1] ?? '';
453 453
 			}, $content);
454 454
 			$twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader(['index' => $content]));
455 455
 			$sandbox = new \Twig\Extension\SandboxExtension(\App\Extension\Twig\SecurityPolicy::getPolicy(), true);
456 456
 			$twig->addExtension($sandbox);
457
-			$twig->addFunction(new \Twig\TwigFunction('YFParser', function ($text) {
457
+			$twig->addFunction(new \Twig\TwigFunction('YFParser', function($text) {
458 458
 				$value = '';
459 459
 				preg_match(static::VARIABLE_REGEX, $text, $matches);
460 460
 				if ($matches) {
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 			}));
466 466
 			$content = $twig->render('index');
467 467
 		}
468
-		return preg_replace_callback(static::VARIABLE_REGEX, function ($matches) {
468
+		return preg_replace_callback(static::VARIABLE_REGEX, function($matches) {
469 469
 			[, $function, $params] = array_pad($matches, 3, '');
470 470
 			return \in_array($function, static::$baseFunctions) ? $this->{$function}($params) : '';
471 471
 		}, $content);
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 		if (isset($this->language)) {
482 482
 			Language::setTemporaryLanguage($this->language);
483 483
 		}
484
-		$this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) {
484
+		$this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function($matches) {
485 485
 			[, $params] = array_pad($matches, 2, '');
486 486
 			return $this->translate($params);
487 487
 		}, $this->content);
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
 	public function getGeneralVariable()
1436 1436
 	{
1437 1437
 		$variables = [
1438
-			'LBL_ENTITY_VARIABLES' => array_map(function ($value) {
1438
+			'LBL_ENTITY_VARIABLES' => array_map(function($value) {
1439 1439
 				return Language::translate($value, 'Other.TextParser');
1440 1440
 			}, array_flip(static::$variableGeneral)),
1441 1441
 		];
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 			}
1596 1596
 		}
1597 1597
 		$generator = new \HTMLPurifier_Generator($config, new \HTMLPurifier_Context());
1598
-		$html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function ($matches) {
1598
+		$html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function($matches) {
1599 1599
 			if (\in_array($matches[1], ['div'])) {
1600 1600
 				return "<{$matches[1]}></{$matches[1]}>";
1601 1601
 			}
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
 			$customFieldClassSeq = 0;
1796 1796
 			foreach ($config['columns'] as $name) {
1797 1797
 				if (false !== strpos($name, '||')) {
1798
-					[$title,$value] = explode('||', $name, 2);
1798
+					[$title, $value] = explode('||', $name, 2);
1799 1799
 					if ('(' === $title[0] && ')' === substr($title, -1)) {
1800 1800
 						$title = $this->parseVariable("\${$title}\$");
1801 1801
 					}
Please login to merge, or discard this patch.
modules/Vtiger/views/Detail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1261,7 +1261,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
api/webservice/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.
api/webservice/RestApi/Users/Record.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 				$rawData[$fieldModel->getName() . '_info'] = \Vtiger_Taxes_UIType::getValues($rawData[$fieldModel->getName()]);
153 153
 			}
154 154
 		}
155
-		unset($fieldsLabel['user_password'],$fieldsLabel['confirm_password'],$fieldsLabel['accesskey'],$displayData['user_password'],$displayData['confirm_password'],$displayData['accesskey'],$rawData['user_password'],$rawData['confirm_password'],$rawData['accesskey']);
155
+		unset($fieldsLabel['user_password'], $fieldsLabel['confirm_password'], $fieldsLabel['accesskey'], $displayData['user_password'], $displayData['confirm_password'], $displayData['accesskey'], $rawData['user_password'], $rawData['confirm_password'], $rawData['accesskey']);
156 156
 		$response = [
157 157
 			'name' => \App\Purifier::decodeHtml($this->recordModel->getName()),
158 158
 			'id' => $this->recordModel->getId(),
Please login to merge, or discard this patch.
app/Utils/Benchmarks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@
 block discarded – undo
193 193
 				'time' => (int) ($readOperations / (microtime(true) - $timeStart)),
194 194
 			];
195 195
 		}
196
-		register_shutdown_function(function () {
196
+		register_shutdown_function(function() {
197 197
 			\vtlib\Functions::recurseDelete('cache/speed');
198 198
 		});
199 199
 		return [
Please login to merge, or discard this patch.
app/MeetingService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,13 +133,13 @@
 block discarded – undo
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, ' ')));
Please login to merge, or discard this patch.
modules/Calendar/views/RightPanel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 		}
56 56
 		if (!empty($users) && $favouriteUsers = $currentUser->getFavouritesUsers()) {
57 57
 			uksort($users,
58
-				function ($a, $b) use ($favouriteUsers) {
58
+				function($a, $b) use ($favouriteUsers) {
59 59
 					return (int) (!isset($favouriteUsers[$a]) && isset($favouriteUsers[$b]));
60 60
 				});
61 61
 			$viewer->assign('FAVOURITES_USERS', $favouriteUsers);
Please login to merge, or discard this patch.