@@ -470,7 +470,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |