Passed
Push — developer ( 418633...1ee7e4 )
by Mariusz
37:21 queued 18:10
created
modules/Calendar/ConfigTemplate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		},
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	'CALENDAR_VIEW' => [
106 106
 		'default' => 'Extended',
107 107
 		'description' => 'Calendar view - allowed values: Extended, Standard, refresh menu files after you change this value',
108
-		'validation' => function () {
108
+		'validation' => function() {
109 109
 			$arg = func_get_arg(0);
110 110
 			return 'Extended' === $arg || 'Standard' === $arg;
111 111
 		},
Please login to merge, or discard this patch.
api/webservice/Token/Auth/Basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	{
22 22
 		$this->api->app = [];
23 23
 		$type = $this->api->request->getByType('_container', \App\Purifier::STANDARD);
24
-		$query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type,  'status' => 1]);
24
+		$query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type, 'status' => 1]);
25 25
 		if ($row = $query->one()) {
26 26
 			$row['id'] = (int) $row['id'];
27 27
 			$this->api->app = $row;
Please login to merge, or discard this patch.
api/webservice/PBX/Auth/Basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	{
22 22
 		$this->api->app = [];
23 23
 		$type = $this->api->request->getByType('_container', \App\Purifier::STANDARD);
24
-		$query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type,  'status' => 1]);
24
+		$query = (new \App\Db\Query())->from('w_#__servers')->where(['type' => $type, 'status' => 1]);
25 25
 		if ($row = $query->one()) {
26 26
 			$row['id'] = (int) $row['id'];
27 27
 			$this->api->app = $row;
Please login to merge, or discard this patch.
config/ConfigTemplates.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 		'enabledServices' => [
11 11
 			'default' => [],
12 12
 			'description' => 'List of active services. Available: dav, webservice',
13
-			'validation' => function () {
13
+			'validation' => function() {
14 14
 				$arg = func_get_arg(0);
15 15
 				return \is_array($arg) && empty(array_diff($arg, ['dav', 'webservice']));
16 16
 			},
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		'upload_maxsize' => [
101 101
 			'default' => 52428800,
102 102
 			'description' => 'Maximum file size for uploaded files in bytes also used when uploading import files: upload_maxsize default value = 52428800 (50MB)',
103
-			'validation' => function () {
103
+			'validation' => function() {
104 104
 				$arg = func_get_arg(0);
105 105
 				return $arg && \App\Validator::naturalNumber($arg) && ($arg * 1048576) <= \App\Config::getMaxUploadSize(false);
106 106
 			},
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		'allow_exports' => [
110 110
 			'default' => 'all',
111 111
 			'description' => 'Flag to allow export functionality: "all" - to allow anyone to use exports, "admin" - to only allow admins to export, "none" -  to block exports completely',
112
-			'validation' => function () {
112
+			'validation' => function() {
113 113
 				$arg = func_get_arg(0);
114 114
 				return \in_array($arg, ['all', 'admin', 'none']);
115 115
 			},
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		'list_max_entries_per_page' => [
122 122
 			'default' => 20,
123 123
 			'description' => 'List max entries per page: default value = 20',
124
-			'validation' => function () {
124
+			'validation' => function() {
125 125
 				$arg = func_get_arg(0);
126 126
 				return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
127 127
 			},
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		'default_module' => [
131 131
 			'default' => 'Home',
132 132
 			'description' => 'Default module: default value = Home',
133
-			'validation' => function () {
133
+			'validation' => function() {
134 134
 				$arg = func_get_arg(0);
135 135
 				return true === \App\Module::isModuleActive($arg);
136 136
 			},
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		'listview_max_textlength' => [
155 155
 			'default' => 40,
156 156
 			'description' => 'Trim descriptions, titles in listviews to this value',
157
-			'validation' => function () {
157
+			'validation' => function() {
158 158
 				$arg = func_get_arg(0);
159 159
 				return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
160 160
 			},
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		'default_timezone' => [
168 168
 			'default' => '_TIMEZONE_',
169 169
 			'description' => 'Set the default timezone as per your preference',
170
-			'validation' => function () {
170
+			'validation' => function() {
171 171
 				$arg = func_get_arg(0);
172 172
 				return \in_array($arg, timezone_identifiers_list());
173 173
 			},
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		'title_max_length' => [
176 176
 			'default' => 60,
177 177
 			'description' => 'Maximum length of characters for title',
178
-			'validation' => function () {
178
+			'validation' => function() {
179 179
 				$arg = func_get_arg(0);
180 180
 				return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
181 181
 			},
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		'href_max_length' => [
185 185
 			'default' => 50,
186 186
 			'description' => 'Maximum length for href tag',
187
-			'validation' => function () {
187
+			'validation' => function() {
188 188
 				$arg = func_get_arg(0);
189 189
 				return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
190 190
 			},
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		'MINIMUM_CRON_FREQUENCY' => [
194 194
 			'default' => 1,
195 195
 			'description' => 'Minimum cron frequency [min]',
196
-			'validation' => function () {
196
+			'validation' => function() {
197 197
 				$arg = func_get_arg(0);
198 198
 				return $arg && \App\Validator::naturalNumber($arg) && (100 >= $arg) && (0 < $arg);
199 199
 			},
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		'listMaxEntriesMassEdit' => [
212 212
 			'default' => 500,
213 213
 			'description' => 'Maximum number of records in a mass edition',
214
-			'validation' => function () {
214
+			'validation' => function() {
215 215
 				$arg = func_get_arg(0);
216 216
 				return $arg && \App\Validator::naturalNumber($arg) && (5000 >= $arg);
217 217
 			},
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		'LOG_LEVELS' => [
308 308
 			'default' => false,
309 309
 			'description' => 'Level of saved/displayed logs. Values: false = All / 3 = error and warning / ["error", "warning", "info", "trace", "profile"]',
310
-			'validation' => function () {
310
+			'validation' => function() {
311 311
 				$arg = func_get_arg(0);
312 312
 				return false === $arg || (\is_array($arg) && array_diff(['error', 'warning', 'info', 'trace', 'profile'], $arg));
313 313
 			},
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 		'SMARTY_ERROR_REPORTING' => [
389 389
 			'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'),
390 390
 			'description' => 'Do not show Smarty Notice in phpError.log',
391
-			'validation' => function () {
391
+			'validation' => function() {
392 392
 				$arg = (string) func_get_arg(0);
393 393
 				return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']);
394 394
 			},
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 		'EXCEPTION_ERROR_LEVEL' => [
397 397
 			'default' => new \Nette\PhpGenerator\PhpLiteral('E_ALL & ~E_NOTICE'),
398 398
 			'description' => "Set the error reporting level. The parameter is either an integer representing a bit field, or named constants.\nhttps://secure.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting\nAll errors - E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED / Critical errors - E_ERROR | E_WARNING | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR",
399
-			'validation' => function () {
399
+			'validation' => function() {
400 400
 				$arg = (string) func_get_arg(0);
401 401
 				return \in_array($arg, ['E_ALL', 'E_ALL & ~E_NOTICE']);
402 402
 			},
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 		'CACHING_DRIVER' => [
569 569
 			'default' => 'Base',
570 570
 			'description' => 'Data caching is about storing some PHP variables in cache and retrieving it later from cache. Drivers: Base, Apcu',
571
-			'validation' => function () {
571
+			'validation' => function() {
572 572
 				$arg = func_get_arg(0);
573 573
 				return 'Basic' === $arg || 'Apcu' === $arg;
574 574
 			},
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 		'MODULES_SPLITTED_EDIT_VIEW_LAYOUT' => [
767 767
 			'default' => [],
768 768
 			'description' => 'List of modules with splitted edit view layout',
769
-			'validation' => function () {
769
+			'validation' => function() {
770 770
 				$arg = func_get_arg(0);
771 771
 				return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames());
772 772
 			},
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 		'GLOBAL_SEARCH_SORTING_RESULTS' => [
872 872
 			'default' => 0,
873 873
 			'description' => 'Global search - Should the results be sorted in MySQL or PHP while displaying (None = 0, PHP = 1, Mysql = 2). The parameter impacts system efficiency.',
874
-			'validation' => function () {
874
+			'validation' => function() {
875 875
 				$arg = func_get_arg(0);
876 876
 				return \is_int($arg) && \in_array($arg, [0, 1, 2]);
877 877
 			},
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 		'GLOBAL_SEARCH_AUTOCOMPLETE' => [
886 886
 			'default' => 1,
887 887
 			'description' => 'Global search - Search for records while entering text  (1/0).',
888
-			'validation' => function () {
888
+			'validation' => function() {
889 889
 				$arg = func_get_arg(0);
890 890
 				return \is_int($arg) && \in_array($arg, [0, 1]);
891 891
 			},
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 		'encryptionMethod' => [
925 925
 			'default' => 'aes-256-cbc',
926 926
 			'description' => 'Encryption method.',
927
-			'validation' => function () {
927
+			'validation' => function() {
928 928
 				$arg = func_get_arg(0);
929 929
 				return empty($arg) || ($arg && \in_array($arg, \App\Encryption::getMethods()));
930 930
 			},
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
 		'permittedModulesByCreatorField' => [
993 993
 			'default' => [],
994 994
 			'description' => 'List of modules to which access is based on the record creation.',
995
-			'validation' => function () {
995
+			'validation' => function() {
996 996
 				$arg = func_get_arg(0);
997 997
 				return \is_array($arg) && array_diff($arg, App\Module::getAllModuleNames());
998 998
 			},
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 		'cookieForceHttpOnly' => [
1064 1064
 			'default' => true,
1065 1065
 			'description' => "Force the use of https only for cookie.\nValues: true, false, null",
1066
-			'validation' => function () {
1066
+			'validation' => function() {
1067 1067
 				$arg = func_get_arg(0);
1068 1068
 				return null === $arg ? $arg : \is_bool($arg);
1069 1069
 			},
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 		'USER_AUTHY_MODE' => [
1082 1082
 			'default' => 'TOTP_OPTIONAL',
1083 1083
 			'description' => "User authentication mode.\n\n@see \\Users_Totp_Authmethod::ALLOWED_USER_AUTHY_MODE\nAvailable values:\nTOTP_OFF - 2FA TOTP is checking off\nTOTP_OPTIONAL - It is defined by the user\nTOTP_OBLIGATORY - It is obligatory.",
1084
-			'validation' => function () {
1084
+			'validation' => function() {
1085 1085
 				$arg = func_get_arg(0);
1086 1086
 				return \in_array($arg, \Users_Totp_Authmethod::ALLOWED_USER_AUTHY_MODE);
1087 1087
 			},
Please login to merge, or discard this patch.
api/webservice/WebserviceStandard/Save.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		$fieldModelList = $this->record->getModule()->getFields();
50 50
 		$viewName = $this->record->isNew() ? 'Create' : 'Edit';
51 51
 		$requestKeys = $request->getAllRaw();
52
-		unset($requestKeys['module'],$requestKeys['action'],$requestKeys['record']);
52
+		unset($requestKeys['module'], $requestKeys['action'], $requestKeys['record']);
53 53
 		if (empty($requestKeys)) {
54 54
 			throw new \Api\Core\Exception('No input data', 406);
55 55
 		}
Please login to merge, or discard this patch.
tests/App/Purifier.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -131,10 +131,10 @@
 block discarded – undo
131 131
 			['Text', 'NotSame', 'ę€ółśążźćń23{}":?>><>?:"{}+_)(*&^%$#@!) &lt;svg/onabort=alert(3)//  <svg/onload=alert(1) onfocus=alert(2)//', 'ę€ółśążźćń23{}":?>><>?:"{}+_)(*&^%$#@!) &lt;svg/onabort=alert(3)//  <svg/onload=alert(1) onfocus=alert(2)//', 'Sample number should be purified', \App\Exceptions\IllegalValue::class],
132 132
 			['Default', 'Same', 'Test-text-string-for-purifier', 'Test-text-string-for-purifier', 'Sample number should be unchanged', null],
133 133
 			['Default', 'NotSame', 'ę€ółśążźćń23{}":?>><>?:"{}+_)(*&^%$#@!) &lt;svg/onabort=alert(3)//  <svg/onload=alert(1) onfocus=alert(2)//', 'ę€ółśążźćń23{}":?>><>?:"{}+_)(*&^%$#@!) &lt;svg/onabort=alert(3)//  <svg/onload=alert(1) onfocus=alert(2)//', 'Sample number should be purified', \App\Exceptions\IllegalValue::class],
134
-			['MailId', 'Same',  '[email protected]> (added by [email protected])', '<[email protected]> (added by [email protected])', 'Sample text should be unchanged', null],
135
-			['MailId', 'Same',  '30.123.12.JavaMail."admin.azure"@A-PROXY01', '<30.123.12.JavaMail."admin.azure"@A-PROXY01>', 'Sample text should be unchanged', null],
136
-			['MailId', 'Same',  '[email protected]', '<[email protected]>', 'Sample text should be unchanged', null],
137
-			['MailId', 'Same',  '[email protected]', ' <[email protected]', 'Sample text should be unchanged', null],
134
+			['MailId', 'Same', '[email protected]> (added by [email protected])', '<[email protected]> (added by [email protected])', 'Sample text should be unchanged', null],
135
+			['MailId', 'Same', '30.123.12.JavaMail."admin.azure"@A-PROXY01', '<30.123.12.JavaMail."admin.azure"@A-PROXY01>', 'Sample text should be unchanged', null],
136
+			['MailId', 'Same', '[email protected]', '<[email protected]>', 'Sample text should be unchanged', null],
137
+			['MailId', 'Same', '[email protected]', ' <[email protected]', 'Sample text should be unchanged', null],
138 138
 			[\App\Purifier::PATH, 'NotSame', '../Test', '../Test', 'Path should be discarded', \App\Exceptions\IllegalValue::class],
139 139
 			[\App\Purifier::PATH, 'Same', '/Test/test', '/Test/test', 'Path should be unchanged', null],
140 140
 		];
Please login to merge, or discard this patch.
app/Integrations/Wapro/Synchronizer/MultiCompany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function process(): int
51 51
 	{
52 52
 		$dataReader = (new \App\Db\Query())->from('dbo.FIRMA')
53
-			->select(['dbo.FIRMA.ID_FIRMY', 'NAZWA', 'NIP', 'REGON',  'WOJEWODZTWO', 'POWIAT', 'GMINA', 'MIEJSCOWOSC',
53
+			->select(['dbo.FIRMA.ID_FIRMY', 'NAZWA', 'NIP', 'REGON', 'WOJEWODZTWO', 'POWIAT', 'GMINA', 'MIEJSCOWOSC',
54 54
 				'POCZTA', 'KOD_POCZTOWY', 'ULICA', 'NR_DOMU', 'NR_LOKALU', 'SKRYTKA', 'E_MAIL', 'TELEFON', 'SYM_KRAJU'])
55 55
 			->leftJoin('dbo.ADRESY_FIRMY', 'dbo.FIRMA.ID_ADRESU_DOMYSLNEGO = dbo.ADRESY_FIRMY.ID_ADRESY_FIRMY')
56 56
 			->where(['>', 'dbo.FIRMA.ID_FIRMY', 0])->createCommand($this->controller->getDb())->query();
Please login to merge, or discard this patch.
app/Integrations/Wapro/Synchronizer/CorrectingInvoice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	public function process(): int
42 42
 	{
43 43
 		$query = (new \App\Db\Query())->select([
44
-			'ID_DOKUMENTU_HANDLOWEGO', 'ID_FIRMY', 'ID_KONTRAHENTA',  'ID_DOK_ORYGINALNEGO', 'ID_UZYTKOWNIKA',
44
+			'ID_DOKUMENTU_HANDLOWEGO', 'ID_FIRMY', 'ID_KONTRAHENTA', 'ID_DOK_ORYGINALNEGO', 'ID_UZYTKOWNIKA',
45 45
 			'NUMER', 'FORMA_PLATNOSCI', 'UWAGI', 'KONTRAHENT_NAZWA', 'WARTOSC_NETTO', 'WARTOSC_BRUTTO', 'DOK_KOREKTY',
46 46
 			'issueTime' => 'cast (dbo.DOKUMENT_HANDLOWY.DATA_WYSTAWIENIA - 36163 as datetime)',
47 47
 			'saleDate' => 'cast (dbo.DOKUMENT_HANDLOWY.DATA_SPRZEDAZY - 36163 as datetime)',
Please login to merge, or discard this patch.
modules/Settings/MailSmtp/models/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 		$params = [];
71 71
 		switch ($name) {
72 72
 			case 'mail_account':
73
-				$params = ['column' => $name, 'name' => $name,  'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'defaultvalue' => '0'];
73
+				$params = ['column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'defaultvalue' => '0'];
74 74
 				$params['uitype'] = 10;
75 75
 				$params['label'] = 'FL_MAIL_ACCOUNT';
76 76
 				$params['referenceList'] = ['MailAccount'];
Please login to merge, or discard this patch.