Completed
Push — spike ( 0c7ee3...52d02b )
by Akihito
02:12
created
src/Injector.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public static function getInstance(string $appName, string $context, string $appDir, string $cacheNamespace = '') : InjectorInterface
32 32
     {
33
-        $injectorId = $appName . $context . $cacheNamespace;
33
+        $injectorId = $appName.$context.$cacheNamespace;
34 34
         if (isset(self::$instances[$injectorId])) {
35 35
             return unserialize(self::$instances[$injectorId], ['allowed_classes' => true]); // __wakeup the injector
36 36
         }
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 
46 46
     private static function factory(Meta $meta, string $context, string $cacheNamespace, ChainCache $cache) : InjectorInterface
47 47
     {
48
-        $scriptDir = $meta->tmpDir . '/di';
49
-        ! is_dir($scriptDir) && ! @mkdir($scriptDir) && ! is_dir($scriptDir);
48
+        $scriptDir = $meta->tmpDir.'/di';
49
+        !is_dir($scriptDir) && !@mkdir($scriptDir) && !is_dir($scriptDir);
50 50
         $module = (new Module)($meta, $context, $cacheNamespace);
51 51
         $rayInjector = new RayInjector($module, $scriptDir);
52 52
         $isDev = $rayInjector->getInstance(Cache::class) instanceof ArrayCache;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             return $rayInjector;
57 57
         }
58
-        $scriptInjector = new ScriptInjector($scriptDir, function () use ($scriptDir, $module) {
58
+        $scriptInjector = new ScriptInjector($scriptDir, function() use ($scriptDir, $module) {
59 59
             return new ScriptinjectorModule($scriptDir, $module);
60 60
         });
61 61
         $scriptInjector->getInstance(AppInterface::class); // cache App as a singleton
Please login to merge, or discard this patch.