@@ -57,7 +57,8 @@ discard block |
||
| 57 | 57 | ] |
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | - $kernel->booting(function () { |
|
| 60 | + $kernel->booting(function () |
|
| 61 | + { |
|
| 61 | 62 | $this->addTransport('cookie', $this->createDefaultCookieTransport()); |
| 62 | 63 | $this->addTransport('header', new HeaderTransport('X-Auth-Token')); |
| 63 | 64 | $this->addTokenStorage('session', SessionTokenStorage::class); |
@@ -104,8 +105,10 @@ discard block |
||
| 104 | 105 | $registry = new TransportRegistry(); |
| 105 | 106 | $registry->setDefaultTransport($config->getDefaultTransport()); |
| 106 | 107 | |
| 107 | - foreach ($config->getTransports() as $name => $transport) { |
|
| 108 | - if ($transport instanceof Autowire) { |
|
| 108 | + foreach ($config->getTransports() as $name => $transport) |
|
| 109 | + { |
|
| 110 | + if ($transport instanceof Autowire) |
|
| 111 | + { |
|
| 109 | 112 | $transport = $transport->resolve($factory); |
| 110 | 113 | } |
| 111 | 114 | |
@@ -41,7 +41,8 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function getStorage(string $name): TokenStorageInterface|string|Autowire |
| 43 | 43 | { |
| 44 | - if (!isset($this->config['storages'][$name])) { |
|
| 44 | + if (!isset($this->config['storages'][$name])) |
|
| 45 | + { |
|
| 45 | 46 | throw new InvalidArgumentException( |
| 46 | 47 | \sprintf('Token storage `%s` is not defined.', $name) |
| 47 | 48 | ); |