Passed
Pull Request — master (#8)
by
unknown
02:41
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/JaravelServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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', [
Please login to merge, or discard this patch.
src/Listeners/ConsoleCommandFinishedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
ecs.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,36 +12,36 @@
 block discarded – undo
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
 };
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
             )->activate();
27 27
     }
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
         $scope = $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
         $scope->detach();
Please login to merge, or discard this patch.
src/Services/Guzzle/HttpTracingMiddlewareFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,19 +16,19 @@
 block discarded – undo
16 16
 {
17 17
     public static function create(): callable
18 18
     {
19
-        return function (callable $handler) {
20
-            return function (RequestInterface $request, array $options) use ($handler) {
19
+        return function(callable $handler) {
20
+            return function(RequestInterface $request, array $options) use ($handler) {
21 21
                 /** @var TraceContextPropagator $contextPropagator */
22 22
                 $contextPropagator = App::make(TraceContextPropagator::class);
23 23
                 /** @var SpanCreator $spanCreator */
24 24
                 $spanCreator = App::make(SpanCreator::class);
25 25
 
26
-                $span = $spanCreator->create(Caller::call(Config::get('jaravel.guzzle.span_name'), [$request]));
26
+                $span = $spanCreator->create(Caller::call(Config::get('jaravel.guzzle.span_name'), [ $request ]));
27 27
 
28
-                $headers = [];
28
+                $headers = [ ];
29 29
                 $contextPropagator->inject($headers);
30 30
 
31
-                SpanTagHelper::setTags($span, Caller::call(Config::get('jaravel.guzzle.tags'), [$request]));
31
+                SpanTagHelper::setTags($span, Caller::call(Config::get('jaravel.guzzle.tags'), [ $request ]));
32 32
 
33 33
                 foreach ($headers as $name => $value) {
34 34
                     $request = $request->withHeader($name, $value);
Please login to merge, or discard this patch.