@@ -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)); |
@@ -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'; |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | } |
51 | 51 | if ($this->relations_email && '-' !== $this->relations_email) { |
52 | - [$relatedModule,$relatedFieldName,$onlyFirst] = array_pad(explode('::', $this->relations_email), 3, false); |
|
52 | + [$relatedModule, $relatedFieldName, $onlyFirst] = array_pad(explode('::', $this->relations_email), 3, false); |
|
53 | 53 | $relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $relatedModule); |
54 | 54 | $relationListView->setFields(['id', $relatedFieldName]); |
55 | 55 | $relationListView->set('search_key', $relatedFieldName); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | 'TABLOID' => [11.00, 17.00], // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in |
87 | 87 | 'EXECUTIVE' => [7.25, 10.50], // = ( 184 x 267 ) mm = ( 7.25 x 10.50 ) in |
88 | 88 | 'FOLIO' => [8.50, 13.00], // = ( 216 x 330 ) mm = ( 8.50 x 13.00 ) in |
89 | - 'B' => [5.04, 7.80], // = ( 128 x 198 ) mm = ( 5.04 x 7.80 ) in |
|
89 | + 'B' => [5.04, 7.80], // = ( 128 x 198 ) mm = ( 5.04 x 7.80 ) in |
|
90 | 90 | 'A' => [4.37, 7.00], // = ( 111 x 178 ) mm = ( 4.37 x 7.00 ) in |
91 | 91 | 'DEMY' => [8.50, 5.31], // = ( 135 x 216 ) mm = ( 8.50 x 5.31 ) in |
92 | 92 | 'ROYAL' => [6.02, 9.21], // = ( 153 x 234 ) mm = ( 6.02 x 9.21 ) in |
@@ -24,12 +24,12 @@ |
||
24 | 24 | public static $allFields = [ |
25 | 25 | 'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title', |
26 | 26 | 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', |
27 | - 'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions', |
|
28 | - 'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles', |
|
27 | + 'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions', |
|
28 | + 'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles', |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle']; |
32 | - public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles']; |
|
32 | + public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles']; |
|
33 | 33 | public static $step3Fields = ['conditions']; |
34 | 34 | public static $module = 'PDF'; |
35 | 35 | public static $parent = 'Settings'; |