Passed
Push — developer ( a375e1...bf1f4a )
by Mariusz
16:04
created
vtlib/Vtiger/Link.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
 				$multitype = true;
188 188
 				if (self::IGNORE_MODULE === $tabid) {
189 189
 					$permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
190
-					$permittedTabIdList[] = 0;  // Added to support one link for all modules
190
+					$permittedTabIdList[] = 0; // Added to support one link for all modules
191 191
 					foreach ($permittedTabIdList as $moduleId) {
192 192
 						foreach ($type as $typ) {
193 193
 							if (isset($rows[$moduleId][$typ])) {
Please login to merge, or discard this patch.
app/TextParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 			$twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader(['index' => $content]));
471 471
 			$sandbox = new \Twig\Extension\SandboxExtension(\App\Extension\Twig\SecurityPolicy::getPolicy(), true);
472 472
 			$twig->addExtension($sandbox);
473
-			$twig->addFunction(new \Twig\TwigFunction('YFParser', function ($text) {
473
+			$twig->addFunction(new \Twig\TwigFunction('YFParser', function($text) {
474 474
 				$value = '';
475 475
 				preg_match(static::VARIABLE_REGEX, $text, $matches);
476 476
 				if ($matches) {
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 			}));
482 482
 			$content = $twig->render('index');
483 483
 		}
484
-		return preg_replace_callback(static::VARIABLE_REGEX, function ($matches) {
484
+		return preg_replace_callback(static::VARIABLE_REGEX, function($matches) {
485 485
 			[, $function, $params] = array_pad($matches, 3, '');
486 486
 			return \in_array($function, static::BASE_FUNCTIONS) ? $this->{$function}($params) : '';
487 487
 		}, $content);
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 		if (isset($this->language)) {
498 498
 			Language::setTemporaryLanguage($this->language);
499 499
 		}
500
-		$this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) {
500
+		$this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function($matches) {
501 501
 			[, $params] = array_pad($matches, 2, '');
502 502
 			return $this->translate($params);
503 503
 		}, $this->content);
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
 			$width = isset($config['width']) ? preg_replace('/[^[:alnum:]]/', '', explode(',', $config['width'])) : [];
1758 1758
 			foreach ($config['columns'] as $key => $name) {
1759 1759
 				if (false !== strpos($name, '||')) {
1760
-					[$title,$value] = explode('||', $name, 2);
1760
+					[$title, $value] = explode('||', $name, 2);
1761 1761
 					if ('(' === $title[0] && ')' === substr($title, -1)) {
1762 1762
 						$title = $this->parseVariable("\${$title}\$");
1763 1763
 					}
Please login to merge, or discard this patch.
modules/Vtiger/models/CalendarExtSource.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		switch ($this->get('type')) {
216 216
 			case 1:
217 217
 				$this->queryGenerator->addNativeCondition([
218
-					'and', ['>=', $columnA, $startFormatted], ['<=', $columnA,  $endFormatted]
218
+					'and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted]
219 219
 				]);
220 220
 				break;
221 221
 			case 3:
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
 				$this->queryGenerator->setField($fieldB->getName());
225 225
 				$this->queryGenerator->addNativeCondition([
226 226
 					'or',
227
-					['and', ['>=', $columnA, $startFormatted], ['<=', $columnA,  $endFormatted]],
228
-					['and', ['>=', $columnB, $startFormatted], ['<=', $columnB,  $endFormatted]],
229
-					['and', ['<', $columnA, $startFormatted], ['>', $columnB,  $endFormatted]],
227
+					['and', ['>=', $columnA, $startFormatted], ['<=', $columnA, $endFormatted]],
228
+					['and', ['>=', $columnB, $startFormatted], ['<=', $columnB, $endFormatted]],
229
+					['and', ['<', $columnA, $startFormatted], ['>', $columnB, $endFormatted]],
230 230
 				]);
231 231
 				break;
232 232
 			case 2:
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 					'or',
238 238
 					[
239 239
 						'and',
240
-						['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"),  $startDateTime],
241
-						['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"),  $endDateTime],
240
+						['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime],
241
+						['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime],
242 242
 					],
243 243
 				]);
244 244
 				break;
@@ -256,16 +256,16 @@  discard block
 block discarded – undo
256 256
 					'or',
257 257
 					[
258 258
 						'and',
259
-						['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"),  $startDateTime],
260
-						['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"),  $endDateTime],
259
+						['>=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $startDateTime],
260
+						['<=', new \yii\db\Expression("CONCAT($columnA, ' ', $columnATime)"), $endDateTime],
261 261
 					],
262 262
 					[
263 263
 						'and',
264
-						['>=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"),  $startDateTime],
265
-						['<=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"),  $endDateTime],
264
+						['>=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $startDateTime],
265
+						['<=', new \yii\db\Expression("CONCAT($columnB, ' ', $columnBTime)"), $endDateTime],
266 266
 					],
267 267
 					[
268
-						'and', ['<', $columnA, $startDate], ['>', $columnB,  $endDate],
268
+						'and', ['<', $columnA, $startDate], ['>', $columnB, $endDate],
269 269
 					],
270 270
 				]);
271 271
 				break;
Please login to merge, or discard this patch.
app/Integrations/Comarch/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 	{
105 105
 		$dbCommand = \App\Db::getInstance('admin')->createCommand();
106 106
 		if (null !== $name) {
107
-			$data = ['name' => "{$type}_last_{$name}",	'value' => $id];
107
+			$data = ['name' => "{$type}_last_{$name}", 'value' => $id];
108 108
 		} else {
109 109
 			$data = ['name' => $type . '_start_date', 'value' => date('Y-m-d H:i:s')];
110 110
 		}
Please login to merge, or discard this patch.
app/Integrations/Comarch/Synchronizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@
 block discarded – undo
464 464
 	public function addToQueue(string $type, int $id): void
465 465
 	{
466 466
 		$data = ['server_id' => $this->config->get('id'),
467
-			'name' => $this->name, 'type' => $type,	'value' => $id,
467
+			'name' => $this->name, 'type' => $type, 'value' => $id,
468 468
 		];
469 469
 		$db = \App\Db::getInstance('admin');
470 470
 		if ((new \App\Db\Query())->from(\App\Integrations\Comarch::QUEUE_TABLE_NAME)
Please login to merge, or discard this patch.
app/Db/Fixer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
 				\App\Log::trace("Updated: {$field['tablename']}.{$field['columnname']} |maximumlength:  before:{$field['maximumlength']} after: $range |type:{$type}|{$column->type}|{$column->dbType}", __METHOD__);
257 257
 			}
258 258
 		}
259
-		return ['NotSupported' => $notSupported, 'TypeNotFound' => $typeNotFound, 'RequiresVerification' => $requiresVerification, 'RequiresVerificationInfo' => $requiresVerificationInfo,  'Updated' => $updated, 'UpdatedInfo' => $updatedInfo];
259
+		return ['NotSupported' => $notSupported, 'TypeNotFound' => $typeNotFound, 'RequiresVerification' => $requiresVerification, 'RequiresVerificationInfo' => $requiresVerificationInfo, 'Updated' => $updated, 'UpdatedInfo' => $updatedInfo];
260 260
 	}
261 261
 
262 262
 	/**
Please login to merge, or discard this patch.
app/SystemWarnings/Integrations/Comarch.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -17,41 +17,41 @@
 block discarded – undo
17 17
  */
18 18
 class Comarch extends \App\SystemWarnings\Template
19 19
 {
20
-    /** {@inheritdoc} */
21
-    protected $title = 'LBL_CHECK_COMARCH_INTEGRATION_LOG';
20
+	/** {@inheritdoc} */
21
+	protected $title = 'LBL_CHECK_COMARCH_INTEGRATION_LOG';
22 22
 
23
-    /**
24
-     * Checks for suspended email accounts.
25
-     *
26
-     * @return void
27
-     */
28
-    public function process(): void
29
-    {
30
-        $db = \App\DB::getInstance('log');
31
-        if(!$db->isTableExists(\App\Integrations\Comarch::LOG_TABLE_NAME)) {
32
-            $this->status = 1;
33
-            return;
34
-        }
35
-        $data = (new \App\Db\Query())->select(['time', 'message'])->from(\App\Integrations\Comarch::LOG_TABLE_NAME)
36
-            ->where([
37
-                'and',
38
-                ['error' => 1],
39
-                ['>=', 'time', date('Y-m-d H:i:s', strtotime('-24 hours'))]
40
-            ])->orderBy(['id' => SORT_DESC])
41
-            ->all($db);
42
-        if ($data) {
43
-            $this->status = 0;
44
-            $this->description = \App\Language::translate('LBL_CHECK_COMARCH_INTEGRATION_LOG_DESC', 'Settings:SystemWarnings');
45
-            $this->description .= '<br>' . \App\TextUtils::getHtmlTable($data, [
46
-                'time' => \App\Language::translate('LBL_TIME', 'Settings:Log'),
47
-                'message' => \App\Language::translate('LBL_MESSAGE', 'Settings:Comarch')
48
-            ]);
49
-            if (\App\Security\AdminAccess::isPermitted('Log')) {
50
-                $this->link = 'index.php?parent=Settings&module=Log&view=LogsViewer&type=mail';
51
-                $this->linkTitle = \App\Language::translate('LBL_LOGS_VIEWER', 'Settings:Log');
52
-            }
53
-        } else {
54
-            $this->status = 1;
55
-        }
56
-    }
23
+	/**
24
+	 * Checks for suspended email accounts.
25
+	 *
26
+	 * @return void
27
+	 */
28
+	public function process(): void
29
+	{
30
+		$db = \App\DB::getInstance('log');
31
+		if(!$db->isTableExists(\App\Integrations\Comarch::LOG_TABLE_NAME)) {
32
+			$this->status = 1;
33
+			return;
34
+		}
35
+		$data = (new \App\Db\Query())->select(['time', 'message'])->from(\App\Integrations\Comarch::LOG_TABLE_NAME)
36
+			->where([
37
+				'and',
38
+				['error' => 1],
39
+				['>=', 'time', date('Y-m-d H:i:s', strtotime('-24 hours'))]
40
+			])->orderBy(['id' => SORT_DESC])
41
+			->all($db);
42
+		if ($data) {
43
+			$this->status = 0;
44
+			$this->description = \App\Language::translate('LBL_CHECK_COMARCH_INTEGRATION_LOG_DESC', 'Settings:SystemWarnings');
45
+			$this->description .= '<br>' . \App\TextUtils::getHtmlTable($data, [
46
+				'time' => \App\Language::translate('LBL_TIME', 'Settings:Log'),
47
+				'message' => \App\Language::translate('LBL_MESSAGE', 'Settings:Comarch')
48
+			]);
49
+			if (\App\Security\AdminAccess::isPermitted('Log')) {
50
+				$this->link = 'index.php?parent=Settings&module=Log&view=LogsViewer&type=mail';
51
+				$this->linkTitle = \App\Language::translate('LBL_LOGS_VIEWER', 'Settings:Log');
52
+			}
53
+		} else {
54
+			$this->status = 1;
55
+		}
56
+	}
57 57
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function process(): void
29 29
     {
30 30
         $db = \App\DB::getInstance('log');
31
-        if(!$db->isTableExists(\App\Integrations\Comarch::LOG_TABLE_NAME)) {
31
+        if (!$db->isTableExists(\App\Integrations\Comarch::LOG_TABLE_NAME)) {
32 32
             $this->status = 1;
33 33
             return;
34 34
         }
Please login to merge, or discard this patch.