@@ -31,13 +31,13 @@ |
||
31 | 31 | throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); |
32 | 32 | } else { |
33 | 33 | // load all the .env files |
34 | - (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); |
|
34 | + (new Dotenv(false))->loadEnv(dirname(__DIR__) . '/.env'); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $_SERVER += $_ENV; |
38 | 38 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; |
39 | 39 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; |
40 | -$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
|
40 | +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
|
41 | 41 | |
42 | 42 | $kernelConfig = Yaml::parse(file_get_contents(realpath(__DIR__ . '/services.yaml'))); |
43 | 43 | if (is_readable($file = __DIR__ . '/services_custom.yaml')) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $this->variableApi->set(VariableApi::CONFIG, 'locale', $params['locale']); |
124 | 124 | // Set the System Identifier as a unique string. |
125 | 125 | if (!$this->variableApi->get(VariableApi::CONFIG, 'system_identifier')) { |
126 | - $this->variableApi->set(VariableApi::CONFIG, 'system_identifier', str_replace('.', '', uniqid((string) (random_int(1000000000, 9999999999)), true))); |
|
126 | + $this->variableApi->set(VariableApi::CONFIG, 'system_identifier', str_replace('.', '', uniqid((string)(random_int(1000000000, 9999999999)), true))); |
|
127 | 127 | } |
128 | 128 | // add admin email as site email |
129 | 129 | $this->variableApi->set(VariableApi::CONFIG, 'adminmail', $params['email']); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | // on upgrade, if a user doesn't add their custom theme back to the /theme dir, it should be reset to a core theme, if available. |
165 | - $defaultTheme = (string) $this->variableApi->getSystemVar('Default_Theme'); |
|
165 | + $defaultTheme = (string)$this->variableApi->getSystemVar('Default_Theme'); |
|
166 | 166 | if (!$this->kernel->isBundle($defaultTheme) && $this->kernel->isBundle('ZikulaBootstrapTheme')) { |
167 | 167 | $this->variableApi->set(VariableApi::CONFIG, 'Default_Theme', 'ZikulaBootstrapTheme'); |
168 | 168 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $text = preg_replace_callback( |
46 | 46 | '/<a [^>]*href\s*=\s*\"?([^>\"]*)\"?[^>]*>(.*?)<\/a.*?>/i', |
47 | - function ($matches) { |
|
47 | + function($matches) { |
|
48 | 48 | $this->links[] = html_entity_decode($matches[1]); |
49 | 49 | // return the replaced link |
50 | 50 | return '<strong><em>' . $matches[2] . '</em></strong> <small>[' . count($this->links) . ']</small>'; |