Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableCacheAdapterForV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(HubInterface $hub, AdapterInterface $decoratedAdapte
*
* @return mixed
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null)
{
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
if (!$this->decoratedAdapter instanceof CacheInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableCacheAdapterForV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(HubInterface $hub, AdapterInterface $decoratedAdapte
*
* @param mixed[] $metadata
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
{
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
if (!$this->decoratedAdapter instanceof CacheInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableCacheAdapterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function reset(): void
*
* @phpstan-return TResult
*/
private function traceFunction(string $spanOperation, \Closure $callback, string $spanDescription = null)
private function traceFunction(string $spanOperation, \Closure $callback, ?string $spanDescription = null)
{
$span = $this->hub->getSpan();

Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(HubInterface $hub, TagAwareAdapterInterface $decorat
*
* @return mixed
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null)
{
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
if (!$this->decoratedAdapter instanceof CacheInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableTagAwareCacheAdapterForV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(HubInterface $hub, TagAwareAdapterInterface $decorat
*
* @param mixed[] $metadata
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
{
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
if (!$this->decoratedAdapter instanceof CacheInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/HttpClient/AbstractTraceableHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function request(string $method, string $url, array $options = []): Respo
/**
* {@inheritdoc}
*/
public function stream($responses, float $timeout = null): ResponseStreamInterface
public function stream($responses, ?float $timeout = null): ResponseStreamInterface
{
if ($responses instanceof AbstractTraceableResponse) {
$responses = [$responses];
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/HttpClient/TraceableResponseForV6.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class TraceableResponseForV6 extends AbstractTraceableResponse implements
/**
* {@inheritdoc}
*/
public function getInfo(string $type = null): mixed
public function getInfo(?string $type = null): mixed
{
return $this->response->getInfo($type);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/SentryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class SentryExtension extends AbstractExtension
/**
* @param HubInterface $hub The current hub
*/
public function __construct(HubInterface $hub = null)
public function __construct(?HubInterface $hub = null)
{
}

Expand Down