-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Tracing/Instrumentation/Messenger/AbstractDateTimeStamp.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the worldia/instrumentation-bundle package. | ||
* (c) Worldia <[email protected]> | ||
*/ | ||
|
||
namespace Instrumentation\Tracing\Instrumentation\Messenger; | ||
|
||
use Symfony\Component\Messenger\Stamp\StampInterface; | ||
|
||
abstract class AbstractDateTimeStamp implements StampInterface | ||
{ | ||
private readonly \DateTimeInterface $dateTime; | ||
|
||
public function __construct(?\DateTimeInterface $dateTime = null) | ||
{ | ||
$this->dateTime = $dateTime ?: new \DateTime(); | ||
} | ||
|
||
public function getDate(): \DateTimeInterface | ||
{ | ||
return $this->dateTime; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the worldia/instrumentation-bundle package. | ||
* (c) Worldia <[email protected]> | ||
*/ | ||
|
||
namespace Instrumentation\Tracing\Instrumentation\Messenger; | ||
|
||
final class ConsumedAtStamp extends AbstractDateTimeStamp | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the worldia/instrumentation-bundle package. | ||
* (c) Worldia <[email protected]> | ||
*/ | ||
|
||
namespace Instrumentation\Tracing\Instrumentation\Messenger; | ||
|
||
final class HandledAtStamp extends AbstractDateTimeStamp | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the worldia/instrumentation-bundle package. | ||
* (c) Worldia <[email protected]> | ||
*/ | ||
|
||
namespace Instrumentation\Tracing\Instrumentation\Messenger; | ||
|
||
final class SentAtStamp extends AbstractDateTimeStamp | ||
{ | ||
} |