@@ -87,8 +87,10 @@ |
||
| 87 | 87 | $registry = new TransportRegistry(); |
| 88 | 88 | $registry->setDefaultTransport($config->getDefaultTransport()); |
| 89 | 89 | |
| 90 | - foreach ($config->getTransports() as $name => $transport) { |
|
| 91 | - if ($transport instanceof Autowire) { |
|
| 90 | + foreach ($config->getTransports() as $name => $transport) |
|
| 91 | + { |
|
| 92 | + if ($transport instanceof Autowire) |
|
| 93 | + { |
|
| 92 | 94 | $transport = $transport->resolve($factory); |
| 93 | 95 | } |
| 94 | 96 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function __construct( |
| 43 | 43 | private readonly ConfiguratorInterface $config, |
| 44 | 44 | private readonly BinderInterface $binder, |
| 45 | - ) { |
|
| 45 | + ){ |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function defineDependencies(): array |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ->getBinder(Spiral::Http) |
| 60 | 60 | ->bind( |
| 61 | 61 | AuthContextInterface::class, |
| 62 | - static fn (?ServerRequestInterface $request): AuthContextInterface => |
|
| 62 | + static fn (?ServerRequestInterface $request) : AuthContextInterface => |
|
| 63 | 63 | ($request ?? throw new InvalidRequestScopeException(AuthContextInterface::class)) |
| 64 | 64 | ->getAttribute(AuthMiddleware::ATTRIBUTE) ?? throw new ContextualObjectNotFoundException( |
| 65 | 65 | AuthContextInterface::class, |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @param non-empty-string $name |
| 115 | 115 | * @param Autowire|HttpTransportInterface|class-string<HttpTransportInterface> $transport |
| 116 | 116 | */ |
| 117 | - public function addTransport(string $name, Autowire|HttpTransportInterface|string $transport): void |
|
| 117 | + public function addTransport(string $name, Autowire | HttpTransportInterface | string $transport): void |
|
| 118 | 118 | { |
| 119 | 119 | $this->config->modify(AuthConfig::CONFIG, new Append('transports', $name, $transport)); |
| 120 | 120 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * @param non-empty-string $name |
| 126 | 126 | * @param Autowire|TokenStorageInterface|class-string<TokenStorageInterface> $storage |
| 127 | 127 | */ |
| 128 | - public function addTokenStorage(string $name, Autowire|TokenStorageInterface|string $storage): void |
|
| 128 | + public function addTokenStorage(string $name, Autowire | TokenStorageInterface | string $storage): void |
|
| 129 | 129 | { |
| 130 | 130 | $this->config->modify(AuthConfig::CONFIG, new Append('storages', $name, $storage)); |
| 131 | 131 | } |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | $registry = new TransportRegistry(); |
| 149 | 149 | $registry->setDefaultTransport($config->getDefaultTransport()); |
| 150 | 150 | |
| 151 | - foreach ($config->getTransports() as $name => $transport) { |
|
| 152 | - if ($transport instanceof Autowire) { |
|
| 151 | + foreach ($config->getTransports() as $name => $transport){ |
|
| 152 | + if ($transport instanceof Autowire){ |
|
| 153 | 153 | $transport = $transport->resolve($factory); |
| 154 | 154 | } |
| 155 | 155 | |