Passed
Push — master ( 9fcc02...c2b592 )
by F. Javier
02:46
created
src/Utility/Utils.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             $_ENV['DATABASE_PASSWD'],
30 30
             $_ENV['ENTITY_DIR']
31 31
         )) {
32
-            fwrite(STDERR, 'Faltan variables de entorno por definir' . PHP_EOL);
32
+            fwrite(STDERR, 'Faltan variables de entorno por definir'.PHP_EOL);
33 33
             exit(1);
34 34
         }
35 35
 
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
         ];
46 46
 
47 47
         $debug = $_ENV['DEBUG'] ?? false;
48
-        $entityDir = dirname(__DIR__, 2) . $_ENV['ENTITY_DIR'];
48
+        $entityDir = dirname(__DIR__, 2).$_ENV['ENTITY_DIR'];
49 49
         $config = Setup::createAnnotationMetadataConfiguration(
50
-            [ $entityDir ],            // paths to mapped entities
51
-            $debug,                    // developper mode
52
-            ini_get('sys_temp_dir'),   // Proxy dir
53
-            null,                      // Cache implementation
50
+            [$entityDir], // paths to mapped entities
51
+            $debug, // developper mode
52
+            ini_get('sys_temp_dir'), // Proxy dir
53
+            null, // Cache implementation
54 54
             false                      // use Simple Annotation Reader
55 55
         );
56 56
         $config->setAutoGenerateProxyClasses(true);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $entityManager = EntityManager::create($dbParams, $config);
63 63
         } catch (\Throwable $e) {
64 64
             $msg = sprintf('ERROR (%d): %s', $e->getCode(), $e->getMessage());
65
-            fwrite(STDERR, $msg . PHP_EOL);
65
+            fwrite(STDERR, $msg.PHP_EOL);
66 66
             exit(1);
67 67
         }
68 68
 
@@ -77,27 +77,27 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public static function loadEnv(string $dir): void
79 79
     {
80
-        require_once $dir . '/vendor/autoload.php';
80
+        require_once $dir.'/vendor/autoload.php';
81 81
 
82 82
         if (!class_exists(\Dotenv\Dotenv::class)) {
83
-            fwrite(STDERR, 'ERROR: No se ha cargado la clase Dotenv' . PHP_EOL);
83
+            fwrite(STDERR, 'ERROR: No se ha cargado la clase Dotenv'.PHP_EOL);
84 84
             exit(1);
85 85
         }
86 86
 
87 87
         // Load environment variables from .env file
88
-        if (file_exists($dir . '/.env')) {
88
+        if (file_exists($dir.'/.env')) {
89 89
             $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env');
90 90
             $dotenv->load();
91 91
         } else {
92
-            fwrite(STDERR, 'ERROR: no existe el fichero .env' . PHP_EOL);
92
+            fwrite(STDERR, 'ERROR: no existe el fichero .env'.PHP_EOL);
93 93
             exit(1);
94 94
         }
95 95
 
96 96
         // Overload (if they exist) with .env.docker or .env.local
97
-        if (isset($_SERVER['DOCKER']) && file_exists($dir . '/.env.docker')) {
97
+        if (isset($_SERVER['DOCKER']) && file_exists($dir.'/.env.docker')) {
98 98
             $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env.docker');
99 99
             $dotenv->load();
100
-        } elseif (file_exists($dir . '/.env.local')) {
100
+        } elseif (file_exists($dir.'/.env.local')) {
101 101
             $dotenv = \Dotenv\Dotenv::createMutable($dir, '.env.local');
102 102
             $dotenv->load();
103 103
         }
Please login to merge, or discard this patch.