File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ class Container
1717
1818 public static function getInstance ()
1919 {
20- if (!isset (static ::$ instances )) {
20+ if (!isset (static ::$ instances ))
2121 static ::$ instances = new self ();
22- }
2322
2423 return static ::$ instances ;
2524 }
@@ -32,18 +31,16 @@ public function bind(string $key, mixed $value): mixed
3231
3332 public function singleton (string $ key , object $ value )
3433 {
35- if (!$ this ->has ($ key )) {
34+ if (!$ this ->has ($ key ))
3635 return $ this ->bind ($ key , $ value );
37- }
3836
3937 return $ this ->storage [$ key ];
4038 }
4139
4240 public function key (string $ key )
4341 {
44- if ($ this ->has ($ key )) {
42+ if ($ this ->has ($ key ))
4543 return $ key ;
46- }
4744
4845 throw new \Exception ("Key ' {$ key }' not found in container. " );
4946 }
You can’t perform that action at this time.
0 commit comments