Skip to content

ref(tracing): Narrow TransactionMetadata parentSamplingRate type to drop PHPStan baseline entry - #2332

Open
sentry-junior[bot] wants to merge 1 commit into
masterfrom
chore/phpstan-baseline-parent-sampling-rate
Open

sentry-junior[bot] wants to merge 1 commit into
masterfrom
chore/phpstan-baseline-parent-sampling-rate

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Removes the PHPStan baseline entry property.unusedType for TransactionMetadata::$parentSamplingRate ("is never assigned int so it can be removed from the property type").

The private property's @var said float|int|null, but the only writers (the constructor and setParentSamplingRate()) take ?float, and getParentSamplingRate() returns ?float. The docblock now says float|null to match.

This is safe because it only changes a docblock on a private property. Runtime behavior and the public API stay the same.

The sibling $sampleRand entry has the same shape. It's left for a separate PR to keep this one to a single baseline entry.

via automation sched_f05c2f3e9355ecbdd933cf87d44ec5c6 · Run ID sched_f05c2f3e9355ecbdd933cf87d44ec5c6:1794128400000.

--

View Session [Sentry]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants