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