@@ -47,23 +47,23 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $pwd = getcwd(); |
| 49 | 49 | if (is_dir($buildDir)) { |
| 50 | - system("rm -rf ${buildDir}"); |
|
| 50 | + system("rm -rf ${builddir}"); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // build env |
| 54 | 54 | $filesystem->mkdir($buildDir, 0755); |
| 55 | 55 | $progress->advance(); |
| 56 | 56 | |
| 57 | - $filesystem->mirror($sourceDir, "${buildDir}/${name}"); |
|
| 57 | + $filesystem->mirror($sourceDir, "${builddir}/${name}"); |
|
| 58 | 58 | $progress->advance(); |
| 59 | 59 | |
| 60 | - PurgeVendorsCommand::cleanVendors("${buildDir}/${name}/vendor", $progress); |
|
| 61 | - FixAutoloaderCommand::fix("${buildDir}/${name}/vendor", $progress); |
|
| 60 | + PurgeVendorsCommand::cleanVendors("${builddir}/${name}/vendor", $progress); |
|
| 61 | + FixAutoloaderCommand::fix("${builddir}/${name}/vendor", $progress); |
|
| 62 | 62 | |
| 63 | 63 | $writableArray = [ |
| 64 | - "${buildDir}/${name}/var/cache", |
|
| 65 | - "${buildDir}/${name}/var/log", |
|
| 66 | - "${buildDir}/${name}/public/uploads", |
|
| 64 | + "${builddir}/${name}/var/cache", |
|
| 65 | + "${builddir}/${name}/var/log", |
|
| 66 | + "${builddir}/${name}/public/uploads", |
|
| 67 | 67 | ]; |
| 68 | 68 | $filesystem->chmod($writableArray, 0777); |
| 69 | 69 | $progress->advance(); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $zip = new ZipArchive(); |
| 87 | 87 | $fileName = "${name}.zip"; |
| 88 | 88 | if (true !== $zip->open($fileName, ZipArchive::CREATE)) { |
| 89 | - $output->writeln("<error>Error creating ${fileName}</error>"); |
|
| 89 | + $output->writeln("<error>Error creating ${filename}</error>"); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | foreach ($allFiles as $file) { |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // build tar |
| 101 | 101 | $fileName = "${name}.tar"; |
| 102 | - system("tar cp ${name} > ${fileName}"); |
|
| 102 | + system("tar cp ${name} > ${filename}"); |
|
| 103 | 103 | $progress->advance(); |
| 104 | - system("gzip ${fileName}"); |
|
| 104 | + system("gzip ${filename}"); |
|
| 105 | 105 | $progress->advance(); |
| 106 | 106 | |
| 107 | 107 | // checksums |
@@ -117,16 +117,16 @@ discard block |
||
| 117 | 117 | -----------------sha1sums----------------- |
| 118 | 118 | ${zipSha1} ${name}.zip |
| 119 | 119 | ${tarSha1} ${name}.tar.gz |
| 120 | -CHECKSUM; |
|
| 120 | +checksum; |
|
| 121 | 121 | file_put_contents("${name}-checksum.txt", $checksum); |
| 122 | 122 | $progress->advance(); |
| 123 | 123 | |
| 124 | 124 | // cleanup |
| 125 | - system("rm -rf ${buildDir} ${name}"); |
|
| 125 | + system("rm -rf ${builddir} ${name}"); |
|
| 126 | 126 | chdir($pwd); |
| 127 | 127 | $progress->advance(); |
| 128 | 128 | $progress->finish(); |
| 129 | 129 | |
| 130 | - $output->writeln("<info>Artifacts built in ${buildDir}/ folder</info>"); |
|
| 130 | + $output->writeln("<info>Artifacts built in ${builddir}/ folder</info>"); |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | Request::setTrustedHosts([$trustedHosts]); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
| 33 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
| 34 | 34 | $request = Request::createFromGlobals(); |
| 35 | 35 | $response = $kernel->handle($request); |
| 36 | 36 | $response->send(); |
@@ -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 | } |