@@ -25,10 +25,12 @@ discard block |
||
25 | 25 | $root = new Container(); |
26 | 26 | $root->bind(LoggerInterface::class, KVLogger::class); |
27 | 27 | |
28 | - $root->runScope(new Scope(), static function (Container $c1) { |
|
28 | + $root->runScope(new Scope(), static function (Container $c1) |
|
29 | + { |
|
29 | 30 | $c1->bind(LoggerInterface::class, FileLogger::class); |
30 | 31 | |
31 | - $c1->runScope(new Scope(), static function (LoggerCarrier $carrier, LoggerInterface $logger) { |
|
32 | + $c1->runScope(new Scope(), static function (LoggerCarrier $carrier, LoggerInterface $logger) |
|
33 | + { |
|
32 | 34 | // from the $root container |
33 | 35 | self::assertInstanceOf(KVLogger::class, $carrier->logger); |
34 | 36 | // from the $c1 container |
@@ -42,7 +44,8 @@ discard block |
||
42 | 44 | $root = new Container(); |
43 | 45 | $root->bind(LoggerInterface::class, KVLogger::class); |
44 | 46 | |
45 | - $root->runScope(new Scope(), static function (Container $c1) { |
|
47 | + $root->runScope(new Scope(), static function (Container $c1) |
|
48 | + { |
|
46 | 49 | $c1->bind(LoggerInterface::class, FileLogger::class); |
47 | 50 | |
48 | 51 | self::assertInstanceOf( |
@@ -59,7 +62,8 @@ discard block |
||
59 | 62 | ->getBinder('test') |
60 | 63 | ->bind(ScopeIndicatorLogger::class, new Container\Autowire(ScopeIndicatorLogger::class)); |
61 | 64 | |
62 | - $logger = $root->runScope(new Scope('test'), static function (?ScopeIndicatorLogger $logger) { |
|
65 | + $logger = $root->runScope(new Scope('test'), static function (?ScopeIndicatorLogger $logger) |
|
66 | + { |
|
63 | 67 | return $logger; |
64 | 68 | }); |
65 | 69 | |
@@ -74,7 +78,8 @@ discard block |
||
74 | 78 | ->getBinder('test') |
75 | 79 | ->bind(ScopeIndicatorLogger::class, new Alias(ScopeIndicatorLogger::class)); |
76 | 80 | |
77 | - $logger = $root->runScope(new Scope('test'), static function (?ScopeIndicatorLogger $logger) { |
|
81 | + $logger = $root->runScope(new Scope('test'), static function (?ScopeIndicatorLogger $logger) |
|
82 | + { |
|
78 | 83 | return $logger; |
79 | 84 | }); |
80 | 85 |