Skip to content

Commit 5cd34df

Browse files
committed
Refactored event listeners handling
1 parent 0aa9c5e commit 5cd34df

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

src/Bridge/BackgroundSpanHandler.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ public function __construct(TracerInterface $tracer)
2525
$this->tracer = $tracer;
2626
}
2727

28-
public function start(Request $request): BackgroundSpanHandler
28+
/**
29+
* @param Request $request
30+
*
31+
* @return BackgroundSpanHandler
32+
*/
33+
public function start(Request $request)
2934
{
3035
$this->span = $this->tracer->start(
3136
'background',
@@ -42,7 +47,10 @@ public function start(Request $request): BackgroundSpanHandler
4247
return $this;
4348
}
4449

45-
public function flush(): BackgroundSpanHandler
50+
/**
51+
* @return BackgroundSpanHandler
52+
*/
53+
public function flush()
4654
{
4755
if (null === $this->span) {
4856
return $this;

src/Bridge/GlobalSpanHandler.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
declare(strict_types=1);
3-
42
namespace Jaeger\Symfony\Bridge;
53

64
use Jaeger\Http\HttpMethodTag;
@@ -32,7 +30,12 @@ public function __construct(TracerInterface $tracer, NameGeneratorInterface $nam
3230
$this->nameGenerator = $nameGenerator;
3331
}
3432

35-
public function start(Request $request): GlobalSpanHandler
33+
/**
34+
* @param Request $request
35+
*
36+
* @return GlobalSpanHandler
37+
*/
38+
public function start(Request $request)
3639
{
3740
$this->span = $this->tracer->start(
3841
$this->nameGenerator->generate(),
@@ -48,7 +51,10 @@ public function start(Request $request): GlobalSpanHandler
4851
return $this;
4952
}
5053

51-
public function finish(): GlobalSpanHandler
54+
/**
55+
* @return GlobalSpanHandler
56+
*/
57+
public function finish()
5258
{
5359
if (null === $this->span) {
5460
return $this;
@@ -58,7 +64,10 @@ public function finish(): GlobalSpanHandler
5864
return $this;
5965
}
6066

61-
public function flush(): GlobalSpanHandler
67+
/**
68+
* @return GlobalSpanHandler
69+
*/
70+
public function flush()
6271
{
6372
if (null === $this->span || null === $this->durationUsec) {
6473
return $this;

src/Bridge/HandlerFlushListener.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
declare(strict_types=1);
3-
42
namespace Jaeger\Symfony\Bridge;
53

64
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

0 commit comments

Comments
 (0)