@@ -18,7 +18,7 @@ |
||
18 | 18 | public $customFieldTable = ['s_#__auto_assign_users' => 'id', 's_#__auto_assign_groups' => 'id', 's_#__auto_assign_roles' => 'id']; |
19 | 19 | |
20 | 20 | /** {@inheritdoc} */ |
21 | - public $listFields = ['subject' => 'FL_SUBJECT', 'tabid' => 'FL_MODULE', 'state' => 'FL_STATE']; |
|
21 | + public $listFields = ['subject' => 'FL_SUBJECT', 'tabid' => 'FL_MODULE', 'state' => 'FL_STATE']; |
|
22 | 22 | |
23 | 23 | /** {@inheritdoc} */ |
24 | 24 | public $name = 'AutomaticAssignment'; |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $this->importCustomLinks($this->_modulexml, $moduleInstance); |
657 | 657 | $this->importCronTasks($this->_modulexml); |
658 | 658 | Module::fireEvent($moduleInstance->name, Module::EVENT_MODULE_POSTINSTALL); |
659 | - register_shutdown_function(function () { |
|
659 | + register_shutdown_function(function() { |
|
660 | 660 | try { |
661 | 661 | chdir(ROOT_DIRECTORY); |
662 | 662 | (new \App\BatchMethod(['method' => '\App\UserPrivilegesFile::recalculateAll', 'params' => []]))->save(); |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | $db->createCommand()->update('vtiger_version', ['current_version' => (string) $this->_modulexml->to_version])->execute(); |
1155 | 1155 | } |
1156 | 1156 | Functions::recurseDelete($dirName); |
1157 | - register_shutdown_function(function () { |
|
1157 | + register_shutdown_function(function() { |
|
1158 | 1158 | try { |
1159 | 1159 | Functions::recurseDelete('cache/templates_c'); |
1160 | 1160 | } catch (\Exception $e) { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | ->setOrder('registration_date', \App\Db::DESC) |
63 | 63 | ->createQuery()->createCommand()->queryAllByGroup(2); |
64 | 64 | |
65 | - $approves = array_keys(array_filter($approvalAll, function ($item) { |
|
65 | + $approves = array_keys(array_filter($approvalAll, function($item) { |
|
66 | 66 | return 'PLL_ACCEPTANCE' === $item[0]; |
67 | 67 | })); |
68 | 68 |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | $separator = '-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-'; |
286 | 286 | $value = (string) $this->vcomponent->{$davName}; |
287 | 287 | if (false !== strpos($value, $separator)) { |
288 | - [$html,$text] = explode($separator, $value, 2); |
|
288 | + [$html, $text] = explode($separator, $value, 2); |
|
289 | 289 | $value = trim(strip_tags($html)) . "\n" . \trim(\str_replace($separator, '', $text)); |
290 | - }else{ |
|
290 | + } else { |
|
291 | 291 | $value = trim(\str_replace('\n', PHP_EOL, $value)); |
292 | 292 | } |
293 | 293 | $value = \App\Purifier::decodeHtml(\App\Purifier::purify($value)); |
@@ -448,14 +448,14 @@ discard block |
||
448 | 448 | $currentUser = \App\User::getCurrentUserModel(); |
449 | 449 | $userTimeZone = new \DateTimeZone($currentUser->getDetail('time_zone')); |
450 | 450 | $sysTimeZone = new \DateTimeZone(\App\Fields\DateTime::getTimeZone()); |
451 | - [$hour , $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
451 | + [$hour, $minute] = explode(':', $currentUser->getDetail('start_hour')); |
|
452 | 452 | $date = new \DateTime('now', $userTimeZone); |
453 | 453 | $date->setTime($hour, $minute); |
454 | 454 | $date->setTimezone($sysTimeZone); |
455 | 455 | $timeStart = $date->format('H:i:s'); |
456 | 456 | |
457 | 457 | $date->setTimezone($userTimeZone); |
458 | - [$hour , $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
458 | + [$hour, $minute] = explode(':', $currentUser->getDetail('end_hour')); |
|
459 | 459 | $date->setTime($hour, $minute); |
460 | 460 | $date->setTimezone($sysTimeZone); |
461 | 461 | $timeEnd = $date->format('H:i:s'); |
@@ -287,7 +287,7 @@ |
||
287 | 287 | if (false !== strpos($value, $separator)) { |
288 | 288 | [$html,$text] = explode($separator, $value, 2); |
289 | 289 | $value = trim(strip_tags($html)) . "\n" . \trim(\str_replace($separator, '', $text)); |
290 | - }else{ |
|
290 | + } else{ |
|
291 | 291 | $value = trim(\str_replace('\n', PHP_EOL, $value)); |
292 | 292 | } |
293 | 293 | $value = \App\Purifier::decodeHtml(\App\Purifier::purify($value)); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $operator = $condition['operator']; |
223 | 223 | $value = $condition['value'] ?? ''; |
224 | 224 | if (!\in_array($operator, self::OPERATORS_WITHOUT_VALUES + array_keys(self::DATE_OPERATORS))) { |
225 | - [$fieldName, $fieldModuleName,] = array_pad(explode(':', $condition['fieldname']), 3, false); |
|
225 | + [$fieldName, $fieldModuleName, ] = array_pad(explode(':', $condition['fieldname']), 3, false); |
|
226 | 226 | $value = \Vtiger_Module_Model::getInstance($fieldModuleName)->getFieldByName($fieldName) |
227 | 227 | ->getUITypeModel() |
228 | 228 | ->getDbConditionBuilderValue($value, $operator); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $advancedConditions['relationConditions'] = self::getConditionsFromRequest($advancedConditions['relationConditions']); |
393 | 393 | } |
394 | 394 | if (!empty($advancedConditions['relationColumns'])) { |
395 | - array_map(function ($v) { |
|
395 | + array_map(function($v) { |
|
396 | 396 | if (!\App\Validator::integer($v)) { |
397 | 397 | throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $v, 406); |
398 | 398 | } |
@@ -339,13 +339,13 @@ discard block |
||
339 | 339 | 'lastCronStart' => ['container' => 'env', 'testCli' => false, 'label' => 'LAST_CRON_START', 'isHtml' => true], |
340 | 340 | 'crmProvider' => ['container' => 'env', 'testCli' => true, 'label' => 'CRM_PROVIDER'], |
341 | 341 | 'appId' => ['container' => 'env', 'testCli' => true, 'label' => 'APP_ID'], |
342 | - 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
342 | + 'open_basedir' => ['container' => 'php', 'type' => 'OpenBasedir', 'testCli' => true, 'mode' => 'showWarnings'], |
|
343 | 343 | 'caCertBundle' => ['recommended' => 'On', 'container' => 'env', 'type' => 'OnOff', 'testCli' => true, 'label' => 'CACERTBUNDLE'], |
344 | 344 | 'caCertBundlePath' => ['recommended' => 'On', 'container' => 'env', 'testCli' => true, 'label' => 'CACERTBUNDLE_PATH'], |
345 | 345 | 'SSL_CERT_FILE' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_FILE'], |
346 | 346 | 'SSL_CERT_DIR' => ['container' => 'env', 'testCli' => true, 'label' => 'SSL_CERT_DIR'], |
347 | - 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
348 | - 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
347 | + 'openssl.cafile' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
348 | + 'openssl.capath' => ['container' => 'php', 'type' => 'NotEmpty', 'testCli' => true, 'mode' => 'showWarnings'], |
|
349 | 349 | ]; |
350 | 350 | |
351 | 351 | /** |
@@ -429,8 +429,8 @@ discard block |
||
429 | 429 | * @var array |
430 | 430 | */ |
431 | 431 | public static $functionalVerification = [ |
432 | - 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
433 | - 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
432 | + 'branding' => ['type' => 'Branding', 'testCli' => false, 'label' => 'FOOTER', 'mode' => 'onlyText'], |
|
433 | + 'shop' => ['type' => 'ShopProducts', 'testCli' => false, 'label' => 'PREMIUM_MODULES', 'mode' => 'onlyText'], |
|
434 | 434 | ]; |
435 | 435 | /** |
436 | 436 | * Php variables. |
@@ -461,13 +461,13 @@ discard block |
||
461 | 461 | public function parseData(string $content) |
462 | 462 | { |
463 | 463 | if ($this->useExtension) { |
464 | - $content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function ($matches) { |
|
464 | + $content = preg_replace_callback('/<!--[\s]+({% [\s\S]+? %})[\s]+-->/u', function($matches) { |
|
465 | 465 | return $matches[1] ?? ''; |
466 | 466 | }, $content); |
467 | 467 | $twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader(['index' => $content])); |
468 | 468 | $sandbox = new \Twig\Extension\SandboxExtension(\App\Extension\Twig\SecurityPolicy::getPolicy(), true); |
469 | 469 | $twig->addExtension($sandbox); |
470 | - $twig->addFunction(new \Twig\TwigFunction('YFParser', function ($text) { |
|
470 | + $twig->addFunction(new \Twig\TwigFunction('YFParser', function($text) { |
|
471 | 471 | $value = ''; |
472 | 472 | preg_match(static::VARIABLE_REGEX, $text, $matches); |
473 | 473 | if ($matches) { |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | })); |
479 | 479 | $content = $twig->render('index'); |
480 | 480 | } |
481 | - return preg_replace_callback(static::VARIABLE_REGEX, function ($matches) { |
|
481 | + return preg_replace_callback(static::VARIABLE_REGEX, function($matches) { |
|
482 | 482 | [, $function, $params] = array_pad($matches, 3, ''); |
483 | 483 | return \in_array($function, static::$baseFunctions) ? $this->{$function}($params) : ''; |
484 | 484 | }, $content); |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | if (isset($this->language)) { |
495 | 495 | Language::setTemporaryLanguage($this->language); |
496 | 496 | } |
497 | - $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function ($matches) { |
|
497 | + $this->content = preg_replace_callback('/\$\(translate : ([,"\+\%\.\=\-\[\]\&\w\s\|]+)\)\$/u', function($matches) { |
|
498 | 498 | [, $params] = array_pad($matches, 2, ''); |
499 | 499 | return $this->translate($params); |
500 | 500 | }, $this->content); |
@@ -1463,7 +1463,7 @@ discard block |
||
1463 | 1463 | public function getGeneralVariable() |
1464 | 1464 | { |
1465 | 1465 | $variables = [ |
1466 | - 'LBL_ENTITY_VARIABLES' => array_map(function ($value) { |
|
1466 | + 'LBL_ENTITY_VARIABLES' => array_map(function($value) { |
|
1467 | 1467 | return Language::translate($value, 'Other.TextParser'); |
1468 | 1468 | }, array_flip(static::$variableGeneral)), |
1469 | 1469 | ]; |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | } |
1624 | 1624 | } |
1625 | 1625 | $generator = new \HTMLPurifier_Generator($config, new \HTMLPurifier_Context()); |
1626 | - $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function ($matches) { |
|
1626 | + $html = preg_replace_callback('/<*([A-Za-z_]\w*)\s\/>/', function($matches) { |
|
1627 | 1627 | if (\in_array($matches[1], ['div'])) { |
1628 | 1628 | return "<{$matches[1]}></{$matches[1]}>"; |
1629 | 1629 | } |
@@ -1825,7 +1825,7 @@ discard block |
||
1825 | 1825 | $width = isset($config['width']) ? preg_replace('/[^[:alnum:]]/', '', explode(',', $config['width'])) : []; |
1826 | 1826 | foreach ($config['columns'] as $key => $name) { |
1827 | 1827 | if (false !== strpos($name, '||')) { |
1828 | - [$title,$value] = explode('||', $name, 2); |
|
1828 | + [$title, $value] = explode('||', $name, 2); |
|
1829 | 1829 | if ('(' === $title[0] && ')' === substr($title, -1)) { |
1830 | 1830 | $title = $this->parseVariable("\${$title}\$"); |
1831 | 1831 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | 'result' => false, |
28 | 28 | 'type'=>'confirm', |
29 | 29 | 'message' => App\Language::translate('LBL_DATES_SELECTED_HOLIDAYS_CONFIRM', $recordModel->getModuleName()), |
30 | - 'hash' => hash('sha256', implode('|',$recordModel->getData())) |
|
30 | + 'hash' => hash('sha256', implode('|', $recordModel->getData())) |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | //Override the default expire time of token |
20 | 20 | \CsrfMagic\Csrf::$expires = \App\Config::security('csrfLifetimeToken', 7200); |
21 | - \CsrfMagic\Csrf::$callback = function ($tokens) { |
|
21 | + \CsrfMagic\Csrf::$callback = function($tokens) { |
|
22 | 22 | throw new \App\Exceptions\Csrf('Invalid request - Response For Illegal Access', 403); |
23 | 23 | }; |
24 | 24 | $js = 'vendor/yetiforce/csrf-magic/src/Csrf.min.js'; |