@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getDefaultDriver(): string |
27 | 27 | { |
28 | - if (!\is_string($this->config['default'])) { |
|
28 | + if (!\is_string($this->config['default'])){ |
|
29 | 29 | throw new InvalidArgumentException('Default trace driver config value must be a string'); |
30 | 30 | } |
31 | 31 | |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | * @return class-string<TracerFactoryInterface>|Autowire|TracerFactoryInterface |
38 | 38 | * @throws InvalidArgumentException |
39 | 39 | */ |
40 | - public function getDriverConfig(string $name): string|Autowire|TracerFactoryInterface |
|
40 | + public function getDriverConfig(string $name): string | Autowire | TracerFactoryInterface |
|
41 | 41 | { |
42 | - if (!isset($this->config['drivers'][$name])) { |
|
42 | + if (!isset($this->config['drivers'][$name])){ |
|
43 | 43 | throw new InvalidArgumentException( |
44 | 44 | \sprintf('Config for telemetry driver `%s` is not defined.', $name) |
45 | 45 | ); |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | |
48 | 48 | $driver = $this->config['drivers'][$name]; |
49 | 49 | |
50 | - if ($driver instanceof TracerFactoryInterface) { |
|
50 | + if ($driver instanceof TracerFactoryInterface){ |
|
51 | 51 | return $driver; |
52 | 52 | } |
53 | 53 | |
54 | - if (!\is_string($driver) && !$driver instanceof Autowire) { |
|
54 | + if (!\is_string($driver) && !$driver instanceof Autowire){ |
|
55 | 55 | throw new InvalidArgumentException( |
56 | 56 | \sprintf('Trace type value for `%s` must be a string or %s', $name, Autowire::class) |
57 | 57 | ); |
@@ -25,7 +25,8 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getDefaultDriver(): string |
27 | 27 | { |
28 | - if (!\is_string($this->config['default'])) { |
|
28 | + if (!\is_string($this->config['default'])) |
|
29 | + { |
|
29 | 30 | throw new InvalidArgumentException('Default trace driver config value must be a string'); |
30 | 31 | } |
31 | 32 | |
@@ -39,7 +40,8 @@ discard block |
||
39 | 40 | */ |
40 | 41 | public function getDriverConfig(string $name): string|Autowire|TracerFactoryInterface |
41 | 42 | { |
42 | - if (!isset($this->config['drivers'][$name])) { |
|
43 | + if (!isset($this->config['drivers'][$name])) |
|
44 | + { |
|
43 | 45 | throw new InvalidArgumentException( |
44 | 46 | \sprintf('Config for telemetry driver `%s` is not defined.', $name) |
45 | 47 | ); |
@@ -47,11 +49,13 @@ discard block |
||
47 | 49 | |
48 | 50 | $driver = $this->config['drivers'][$name]; |
49 | 51 | |
50 | - if ($driver instanceof TracerFactoryInterface) { |
|
52 | + if ($driver instanceof TracerFactoryInterface) |
|
53 | + { |
|
51 | 54 | return $driver; |
52 | 55 | } |
53 | 56 | |
54 | - if (!\is_string($driver) && !$driver instanceof Autowire) { |
|
57 | + if (!\is_string($driver) && !$driver instanceof Autowire) |
|
58 | + { |
|
55 | 59 | throw new InvalidArgumentException( |
56 | 60 | \sprintf('Trace type value for `%s` must be a string or %s', $name, Autowire::class) |
57 | 61 | ); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | private readonly ClockInterface $clock, |
20 | 20 | LogsInterface $logs, |
21 | 21 | string $channel = self::LOG_CHANNEL |
22 | - ) { |
|
22 | + ){ |
|
23 | 23 | $this->logger = $logs->getLogger($channel); |
24 | 24 | } |
25 | 25 |
@@ -11,8 +11,8 @@ |
||
11 | 11 | * @param non-empty-string|null $description |
12 | 12 | */ |
13 | 13 | public function __construct( |
14 | - public readonly string|int $code, |
|
14 | + public readonly string | int $code, |
|
15 | 15 | public readonly ?string $description = null |
16 | - ) { |
|
16 | + ){ |
|
17 | 17 | } |
18 | 18 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private readonly ?ScopeInterface $scope = new Container(), |
14 | - ) { |
|
14 | + ){ |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function make(array $context = []): TracerInterface |
@@ -23,7 +23,7 @@ |
||
23 | 23 | private readonly ClockInterface $clock, |
24 | 24 | private readonly LoggerInterface $logger, |
25 | 25 | private readonly UuidFactoryInterface $uuidFactory |
26 | - ) { |
|
26 | + ){ |
|
27 | 27 | parent::__construct($scope); |
28 | 28 | } |
29 | 29 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $tracerFactory->shouldReceive('make') |
23 | 23 | ->once() |
24 | 24 | ->with(['some' => 'data']) |
25 | - ->andReturn( $tracer = new NullTracer()); |
|
25 | + ->andReturn($tracer = new NullTracer()); |
|
26 | 26 | |
27 | 27 | $handler = new Handler( |
28 | 28 | core: $core = m::mock(CoreInterface::class), |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $factory->shouldReceive('make')->andReturnUsing(function (string $name): QueueInterface { |
88 | 88 | $result = ['sync' => $this->defaultQueue, 'test' => $this->testQueue][$name] ?? null; |
89 | 89 | |
90 | - if ($result === null) { |
|
90 | + if ($result === null){ |
|
91 | 91 | throw new NotFoundException(); |
92 | 92 | } |
93 | 93 | return $result; |
@@ -87,7 +87,8 @@ |
||
87 | 87 | $factory->shouldReceive('make')->andReturnUsing(function (string $name): QueueInterface { |
88 | 88 | $result = ['sync' => $this->defaultQueue, 'test' => $this->testQueue][$name] ?? null; |
89 | 89 | |
90 | - if ($result === null) { |
|
90 | + if ($result === null) |
|
91 | + { |
|
91 | 92 | throw new NotFoundException(); |
92 | 93 | } |
93 | 94 | return $result; |
@@ -39,9 +39,9 @@ |
||
39 | 39 | * @return TokenStorageInterface|class-string<TokenStorageInterface>|Autowire |
40 | 40 | * @throws InvalidArgumentException |
41 | 41 | */ |
42 | - public function getStorage(string $name): TokenStorageInterface|string|Autowire |
|
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 | throw new InvalidArgumentException( |
46 | 46 | \sprintf('Token storage `%s` is not defined.', $name) |
47 | 47 | ); |
@@ -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 | ); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | TransportRegistry $transportRegistry, |
30 | 30 | ?EventDispatcherInterface $eventDispatcher = null, |
31 | 31 | ?string $storage = null |
32 | - ) { |
|
32 | + ){ |
|
33 | 33 | $this->authMiddleware = new AuthTransportMiddleware( |
34 | 34 | $transportName, |
35 | 35 | $scope, |