Passed
Push — master ( 28ef5a...cbea9e )
by F. Javier
02:38
created
src/Utility/Utils.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,35 +25,35 @@
 block discarded – undo
25 25
      */
26 26
     public static function loadEnv(string $dir): void
27 27
     {
28
-        require_once $dir . '/vendor/autoload.php';
28
+        require_once $dir.'/vendor/autoload.php';
29 29
 
30 30
         if (!class_exists(Dotenv::class)) {
31
-            fwrite(STDERR, 'ERROR: No se ha cargado la clase Dotenv' . PHP_EOL);
31
+            fwrite(STDERR, 'ERROR: No se ha cargado la clase Dotenv'.PHP_EOL);
32 32
             exit(1);
33 33
         }
34 34
 
35 35
         try {
36 36
             // Load environment variables from .env file
37
-            if (file_exists($dir . '/.env')) {
37
+            if (file_exists($dir.'/.env')) {
38 38
                 $dotenv = Dotenv::createMutable($dir, '.env');
39 39
                 $dotenv->load();
40 40
             } else {
41
-                fwrite(STDERR, 'ERROR: no existe el fichero .env' . PHP_EOL);
41
+                fwrite(STDERR, 'ERROR: no existe el fichero .env'.PHP_EOL);
42 42
                 exit(1);
43 43
             }
44 44
 
45 45
             // Overload (if they exist) with .env.docker or .env.local
46
-            if (isset($_SERVER['DOCKER']) && file_exists($dir . '/.env.docker')) {
46
+            if (isset($_SERVER['DOCKER']) && file_exists($dir.'/.env.docker')) {
47 47
                 $dotenv = Dotenv::createMutable($dir, '.env.docker');
48 48
                 $dotenv->load();
49
-            } elseif (file_exists($dir . '/.env.local')) {
49
+            } elseif (file_exists($dir.'/.env.local')) {
50 50
                 $dotenv = Dotenv::createMutable($dir, '.env.local');
51 51
                 $dotenv->load();
52 52
             }
53 53
         } catch (Throwable $e) {
54 54
             fwrite(
55 55
                 STDERR,
56
-                'EXCEPCIÓN: ' . $e->getCode() . ' - ' . $e->getMessage()
56
+                'EXCEPCIÓN: '.$e->getCode().' - '.$e->getMessage()
57 57
             );
58 58
             exit(1);
59 59
         }
Please login to merge, or discard this patch.
src/Utility/DoctrineConnector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 $_ENV['ENTITY_DIR']
42 42
             )
43 43
         ) {
44
-            fwrite(STDERR, 'Faltan variables de entorno por definir' . PHP_EOL);
44
+            fwrite(STDERR, 'Faltan variables de entorno por definir'.PHP_EOL);
45 45
             exit(1);
46 46
         }
47 47
 
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
             'charset'   => $_ENV['DATABASE_CHARSET'] ?? 'UTF8',
57 57
         ];
58 58
 
59
-        $entityDir = dirname(__DIR__, 2) . '/' . $_ENV['ENTITY_DIR'];
59
+        $entityDir = dirname(__DIR__, 2).'/'.$_ENV['ENTITY_DIR'];
60 60
         // $debug = $_ENV['DEBUG'] ?? false;
61 61
         $queryCache = new PhpFilesAdapter('doctrine_queries');
62 62
         // $metadataCache = new PhpFilesAdapter('doctrine_metadata');
63 63
         $resultsCache = new PhpFilesAdapter('doctrine_results');
64 64
         $config = ORM\ORMSetup::createAttributeMetadataConfiguration(
65
-            [ $entityDir ],            // paths to mapped entities
66
-            true,                      // developper mode
65
+            [$entityDir], // paths to mapped entities
66
+            true, // developper mode
67 67
             (string) ini_get('sys_temp_dir')   // Proxy dir
68 68
         );
69 69
         $config->setQueryCache($queryCache);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $entityManager = new ORM\EntityManager($connection, $config);
80 80
         } catch (Throwable $e) {
81 81
             $msg = sprintf('ERROR (%d): %s', $e->getCode(), $e->getMessage());
82
-            fwrite(STDERR, $msg . PHP_EOL);
82
+            fwrite(STDERR, $msg.PHP_EOL);
83 83
             exit(1);
84 84
         }
85 85
 
Please login to merge, or discard this patch.