Passed
Branch master (536a73)
by F. Javier
07:37
created
Category
src/Utility/Utils.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.