From faffa14c31a7bc8e368384e7f86863670815935d Mon Sep 17 00:00:00 2001 From: Richard van Duijvenbode Date: Tue, 14 Jan 2025 12:05:11 +0100 Subject: [PATCH] Fix PHP 8.4 deprecations and add some typing --- src/Activator/TraceableChainActivator.php | 4 ++-- src/Profiler/FeatureDataCollector.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Activator/TraceableChainActivator.php b/src/Activator/TraceableChainActivator.php index d4f00d4..602b93f 100644 --- a/src/Activator/TraceableChainActivator.php +++ b/src/Activator/TraceableChainActivator.php @@ -23,7 +23,7 @@ class TraceableChainActivator extends ChainActivator /** * {@inheritdoc} */ - public function isActive($name, Context $context): bool + public function isActive($name, ?Context $context): bool { $stack = []; $result = false; @@ -52,7 +52,7 @@ public function isActive($name, Context $context): bool * * @return array */ - public function getTrace() + public function getTrace(): array { return $this->trace; } diff --git a/src/Profiler/FeatureDataCollector.php b/src/Profiler/FeatureDataCollector.php index a4d7dad..41307a1 100644 --- a/src/Profiler/FeatureDataCollector.php +++ b/src/Profiler/FeatureDataCollector.php @@ -47,7 +47,7 @@ public function __construct(ChainActivator $chainActivator, ChainDecorator $chai /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, Throwable $exception = null): void + public function collect(Request $request, Response $response, ?Throwable $exception = null): void { $this->data = [ 'summary' => [