@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $_ENV['ENTITY_DIR'] |
32 | 32 | ) |
33 | 33 | ) { |
34 | - fwrite(STDERR, 'Faltan variables de entorno por definir' . PHP_EOL); |
|
34 | + fwrite(STDERR, 'Faltan variables de entorno por definir'.PHP_EOL); |
|
35 | 35 | exit(1); |
36 | 36 | } |
37 | 37 | |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | ]; |
48 | 48 | |
49 | 49 | $debug = $_ENV['DEBUG'] ?? false; |
50 | - $entityDir = dirname(__DIR__, 2) . $_ENV['ENTITY_DIR']; |
|
50 | + $entityDir = dirname(__DIR__, 2).$_ENV['ENTITY_DIR']; |
|
51 | 51 | $config = Setup::createAnnotationMetadataConfiguration( |
52 | - [ $entityDir ], // paths to mapped entities |
|
53 | - $debug, // developper mode |
|
54 | - ini_get('sys_temp_dir'), // Proxy dir |
|
55 | - null, // Cache implementation |
|
52 | + [$entityDir], // paths to mapped entities |
|
53 | + $debug, // developper mode |
|
54 | + ini_get('sys_temp_dir'), // Proxy dir |
|
55 | + null, // Cache implementation |
|
56 | 56 | false // use Simple Annotation Reader |
57 | 57 | ); |
58 | 58 | $config->setAutoGenerateProxyClasses(true); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $entityManager = EntityManager::create($dbParams, $config); |
65 | 65 | } catch (\Throwable $e) { |
66 | 66 | $msg = sprintf('ERROR (%d): %s', $e->getCode(), $e->getMessage()); |
67 | - fwrite(STDERR, $msg . PHP_EOL); |
|
67 | + fwrite(STDERR, $msg.PHP_EOL); |
|
68 | 68 | exit(1); |
69 | 69 | } |
70 | 70 | |
@@ -79,19 +79,19 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public static function loadEnv(string $dir): void |
81 | 81 | { |
82 | - require_once $dir . '/vendor/autoload.php'; |
|
82 | + require_once $dir.'/vendor/autoload.php'; |
|
83 | 83 | |
84 | 84 | if (!class_exists(\Dotenv\Dotenv::class)) { |
85 | - fwrite(STDERR, 'ERROR: No se ha cargado la clase DotENV' . PHP_EOL); |
|
85 | + fwrite(STDERR, 'ERROR: No se ha cargado la clase DotENV'.PHP_EOL); |
|
86 | 86 | exit(1); |
87 | 87 | } |
88 | 88 | |
89 | 89 | // Load environment variables from .env file |
90 | - if (file_exists($dir . '/.env')) { |
|
90 | + if (file_exists($dir.'/.env')) { |
|
91 | 91 | $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env'); |
92 | 92 | $dotenv->load(); |
93 | 93 | } else { |
94 | - fwrite(STDERR, 'ERROR: no existe el fichero .env' . PHP_EOL); |
|
94 | + fwrite(STDERR, 'ERROR: no existe el fichero .env'.PHP_EOL); |
|
95 | 95 | exit(1); |
96 | 96 | } |
97 | 97 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if (isset($_SERVER['DOCKER'])) { |
100 | 100 | $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env.docker'); |
101 | 101 | $dotenv->load(); |
102 | - } elseif (file_exists($dir . '/.env.local')) { |
|
102 | + } elseif (file_exists($dir.'/.env.local')) { |
|
103 | 103 | $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env.local'); |
104 | 104 | $dotenv->load(); |
105 | 105 | } |