@@ -13,13 +13,13 @@ |
||
13 | 13 | public function allowRequest(Request $request): bool |
14 | 14 | { |
15 | 15 | if (Config::get('jaravel.http.allow_request')) { |
16 | - if (!Caller::call(Config::get('jaravel.http.allow_request'), [$request])) { |
|
16 | + if (!Caller::call(Config::get('jaravel.http.allow_request'), [ $request ])) { |
|
17 | 17 | return false; |
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
21 | 21 | if (Config::get('jaravel.http.deny_request')) { |
22 | - if (Caller::call(Config::get('jaravel.http.deny_request'), [$request])) { |
|
22 | + if (Caller::call(Config::get('jaravel.http.deny_request'), [ $request ])) { |
|
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | } |
@@ -19,9 +19,9 @@ |
||
19 | 19 | |
20 | 20 | public function allow(): bool |
21 | 21 | { |
22 | - $filteredCommands = Config::get('jaravel.console.filter_commands', ['schedule:run', 'horizon', 'queue:']); |
|
22 | + $filteredCommands = Config::get('jaravel.console.filter_commands', [ 'schedule:run', 'horizon', 'queue:' ]); |
|
23 | 23 | |
24 | - $command = $this->request->server('argv')[1] ?? ''; |
|
24 | + $command = $this->request->server('argv')[ 1 ] ?? ''; |
|
25 | 25 | |
26 | 26 | return !Str::contains($command, $filteredCommands); |
27 | 27 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | 'console' => [ |
57 | 57 | 'span_name' => fn (string $command, ?InputInterface $input = null) => 'Console: ' . $command, |
58 | - 'filter_commands' => ['schedule:run', 'horizon', 'queue:'], |
|
58 | + 'filter_commands' => [ 'schedule:run', 'horizon', 'queue:' ], |
|
59 | 59 | 'tags' => fn (string $command, int $exitCode, ?InputInterface $input = null, ?OutputInterface $output = null) => [ |
60 | 60 | 'type' => 'console', |
61 | 61 | 'console_command' => $command, |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return $command; |
26 | 26 | } |
27 | 27 | |
28 | - $command->{$tracingContextField} = []; |
|
28 | + $command->{$tracingContextField} = [ ]; |
|
29 | 29 | $this->contextPropagator->inject($command->{$tracingContextField}, ArrayAccessGetterSetter::getInstance()); |
30 | 30 | |
31 | 31 | return $command; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $spanBuilder = $this->tracer->spanBuilder($operationName); |
26 | 26 | |
27 | 27 | if ($traceIdHeader) { |
28 | - $context = $this->contextPropagator->extract([TraceContextPropagator::TRACEPARENT => $traceIdHeader]); |
|
28 | + $context = $this->contextPropagator->extract([ TraceContextPropagator::TRACEPARENT => $traceIdHeader ]); |
|
29 | 29 | $spanBuilder->setParent($context); |
30 | 30 | } |
31 | 31 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function extendJobsDispatcher(): void |
57 | 57 | { |
58 | 58 | $dispatcher = $this->app->make(Dispatcher::class); |
59 | - $this->app->extend(Dispatcher::class, function () use ($dispatcher) { |
|
59 | + $this->app->extend(Dispatcher::class, function() use ($dispatcher) { |
|
60 | 60 | return $this->app->make(JobWithTracingInjectionDispatcher::class, compact('dispatcher')); |
61 | 61 | }); |
62 | 62 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $exporter = new AgentExporter($tracerName, "{$host}:{$port}"); |
76 | 76 | |
77 | 77 | $tracerProvider = new TracerProvider(new SimpleSpanProcessor($exporter)); |
78 | - ShutdownHandler::register([$tracerProvider, 'shutdown']); |
|
78 | + ShutdownHandler::register([ $tracerProvider, 'shutdown' ]); |
|
79 | 79 | $tracer = $tracerProvider->getTracer($tracerName); |
80 | 80 | |
81 | 81 | $this->app->instance(TracerInterface::class, $tracer); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | return; |
88 | 88 | } |
89 | 89 | |
90 | - Event::listen(MessageLogged::class, function (MessageLogged $e) { |
|
90 | + Event::listen(MessageLogged::class, function(MessageLogged $e) { |
|
91 | 91 | $span = Span::getCurrent(); |
92 | 92 | |
93 | 93 | $span->addEvent('Log', [ |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | SpanTagHelper::setTags( |
25 | 25 | $span, |
26 | - Caller::call($callableConfig, [$event->command, $event->exitCode, $event->input, $event->output]) |
|
26 | + Caller::call($callableConfig, [ $event->command, $event->exitCode, $event->input, $event->output ]) |
|
27 | 27 | ); |
28 | 28 | |
29 | 29 | $span->end(); |
@@ -12,36 +12,36 @@ |
||
12 | 12 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
13 | 13 | use Symplify\EasyCodingStandard\ValueObject\Option; |
14 | 14 | |
15 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
15 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
16 | 16 | $containerConfigurator->import(__DIR__ . '/vendor/umbrellio/code-style-php/umbrellio-cs.php'); |
17 | 17 | |
18 | 18 | $services = $containerConfigurator->services(); |
19 | 19 | |
20 | 20 | $services->set(PhpUnitTestAnnotationFixer::class) |
21 | - ->call('configure', [[ |
|
21 | + ->call('configure', [ [ |
|
22 | 22 | 'style' => 'prefix', |
23 | - ]]); |
|
23 | + ] ]); |
|
24 | 24 | |
25 | 25 | $services->set(DeclareStrictTypesFixer::class); |
26 | 26 | $services->set(NoUnusedImportsFixer::class); |
27 | 27 | $services->set(NoEmptyPhpdocFixer::class); |
28 | 28 | |
29 | 29 | $services->set(BlankLineBeforeStatementFixer::class) |
30 | - ->call('configure', [[ |
|
31 | - 'statements' => ['if', 'return'], |
|
32 | - ]]); |
|
30 | + ->call('configure', [ [ |
|
31 | + 'statements' => [ 'if', 'return' ], |
|
32 | + ] ]); |
|
33 | 33 | |
34 | 34 | $services->set(PhpdocLineSpanFixer::class) |
35 | - ->call('configure', [[ |
|
35 | + ->call('configure', [ [ |
|
36 | 36 | 'method' => 'single', |
37 | 37 | 'property' => 'single', |
38 | 38 | 'const' => 'single', |
39 | - ]]); |
|
39 | + ] ]); |
|
40 | 40 | |
41 | 41 | $parameters = $containerConfigurator->parameters(); |
42 | 42 | |
43 | 43 | $parameters->set(Option::CACHE_DIRECTORY, '.ecs_cache'); |
44 | - $parameters->set(Option::FILE_EXTENSIONS, ['php']); |
|
44 | + $parameters->set(Option::FILE_EXTENSIONS, [ 'php' ]); |
|
45 | 45 | |
46 | - $parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/tests']); |
|
46 | + $parameters->set(Option::PATHS, [ __DIR__ . '/src', __DIR__ . '/tests' ]); |
|
47 | 47 | }; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $traceIdHeader = $this->traceIdHeaderRetriever->retrieve(iterator_to_array($request->headers)); |
49 | 49 | |
50 | 50 | $this->spanCreator->create( |
51 | - Caller::call(Config::get('jaravel.http.span_name'), [$request]), |
|
51 | + Caller::call(Config::get('jaravel.http.span_name'), [ $request ]), |
|
52 | 52 | $traceIdHeader |
53 | 53 | )->activate(); |
54 | 54 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'type' => 'http', |
70 | 70 | ]); |
71 | 71 | |
72 | - SpanTagHelper::setTags($span, Caller::call($callableConfig, [$request, $response])); |
|
72 | + SpanTagHelper::setTags($span, Caller::call($callableConfig, [ $request, $response ])); |
|
73 | 73 | |
74 | 74 | $span->end(); |
75 | 75 | $scope->detach(); |