Passed
Pull Request — master (#8)
by
unknown
05:10 queued 02:17
created
src/Services/Http/TracingRequestGuard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Services/ConsoleCommandFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/config/jaravel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Services/TraceIdHeaderRetriever.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@
 block discarded – undo
6 6
 
7 7
 class TraceIdHeaderRetriever
8 8
 {
9
-    public function retrieve(array $carrier = [], ?string $keyHeader = TraceContextPropagator::TRACEPARENT): ?string
9
+    public function retrieve(array $carrier = [ ], ?string $keyHeader = TraceContextPropagator::TRACEPARENT): ?string
10 10
     {
11 11
         if (!$keyHeader) {
12 12
             $keyHeader = TraceContextPropagator::TRACEPARENT;
13 13
         }
14 14
 
15
-        if (empty($carrier[$keyHeader])) {
15
+        if (empty($carrier[ $keyHeader ])) {
16 16
             return null;
17 17
         }
18 18
 
19
-        if (is_array($carrier[$keyHeader])) {
20
-            return $carrier[$keyHeader][0];
19
+        if (is_array($carrier[ $keyHeader ])) {
20
+            return $carrier[ $keyHeader ][ 0 ];
21 21
         }
22 22
 
23
-        return $carrier[$keyHeader];
23
+        return $carrier[ $keyHeader ];
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
src/Services/Job/JobInjectionMaker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Services/Span/SpanCreator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Listeners/ConsoleCommandStartedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $this->spanCreator
24 24
             ->create(
25
-                Caller::call(ConfigRepository::get('jaravel.console.span_name'), [$event->command, $event->input])
25
+                Caller::call(ConfigRepository::get('jaravel.console.span_name'), [ $event->command, $event->input ])
26 26
             )
27 27
             ->activate();
28 28
     }
Please login to merge, or discard this patch.
src/Middleware/JobTracingMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function handle($job, callable $next)
27 27
     {
28
-        $payload = $job->{self::JOB_TRACING_CONTEXT_FIELD} ?? [];
28
+        $payload = $job->{self::JOB_TRACING_CONTEXT_FIELD} ?? [ ];
29 29
 
30 30
         $traceIdHeader = $this->traceIdHeaderRetriever->retrieve($payload);
31 31
 
32 32
         $span = $this->spanCreator->create(
33
-            Caller::call(Config::get('jaravel.job.span_name'), [$job, $job->job ?? null]),
33
+            Caller::call(Config::get('jaravel.job.span_name'), [ $job, $job->job ?? null ]),
34 34
             $traceIdHeader
35 35
         );
36 36
         $spanScope = $span->activate();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             'type' => 'job',
42 42
         ]);
43 43
 
44
-        SpanTagHelper::setTags($span, Caller::call($callableConfig, [$job, $job->job ?? null]));
44
+        SpanTagHelper::setTags($span, Caller::call($callableConfig, [ $job, $job->job ?? null ]));
45 45
 
46 46
         $span->end();
47 47
         $spanScope->detach();
Please login to merge, or discard this patch.
src/Middleware/HttpTracingMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $traceIdHeader = $this->traceIdHeaderRetriever->retrieve($headers, $this->headerNameQuery->name());
51 51
 
52 52
         $this->spanCreator->create(
53
-            Caller::call(Config::get('jaravel.http.span_name'), [$request]),
53
+            Caller::call(Config::get('jaravel.http.span_name'), [ $request ]),
54 54
             $traceIdHeader
55 55
         )->activate();
56 56
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             'type' => 'http',
72 72
         ]);
73 73
 
74
-        SpanTagHelper::setTags($span, Caller::call($callableConfig, [$request, $response]));
74
+        SpanTagHelper::setTags($span, Caller::call($callableConfig, [ $request, $response ]));
75 75
 
76 76
         $span->end();
77 77
         $scope->detach();
Please login to merge, or discard this patch.