Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: update backoff methods return type to include string - #409

Merged
albertcht merged 1 commit into
hypervel:0.3from
chinfuyang:fix/job-backoff-return-type
Jul 2, 2026
Merged

albertcht merged 1 commit into
hypervel:0.3from
chinfuyang:fix/job-backoff-return-type

Conversation

@chinfuyang

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 166bb695-e606-413f-93b6-46924a85308b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR tightens return-type declarations for the two backoff-related methods. Job::backoff() gains string in its union type (both PHP and PHPDoc) to reflect that the stored payload value is a comma-separated string written by getJobBackoff; Queue::getJobBackoff() is narrowed from mixed to ?string, which is precise since it always returns null or a Collection::implode result.

  • Job::backoff() return type updated from array|int|null to array|int|string|null, matching what is actually read back from the job payload.
  • Queue::getJobBackoff() return type tightened from mixed to ?string; the method body only ever returns null or a comma-joined string, so this is strictly more accurate.

Confidence Score: 5/5

Two-line type-declaration update with no behavioural change; safe to merge.

Both changes are pure type-annotation corrections that bring declarations in line with what the methods already return. No logic is altered, and the narrowed types are verified against all call sites.

No files require special attention.

Important Files Changed

Filename Overview
src/queue/src/Jobs/Job.php Adds string to the return type of backoff() (both PHP union type and PHPDoc), matching the reality that the payload stores backoff as a comma-separated string via getJobBackoff.
src/queue/src/Queue.php Narrows getJobBackoff return type from mixed to ?string; correct since the method always returns either null or a comma-joined string from Collection::implode.

Reviews (1): Last reviewed commit: "fix: update return type for backoff meth..." | Re-trigger Greptile

@albertcht
albertcht merged commit c3d5e36 into hypervel:0.3 Jul 2, 2026
7 of 10 checks passed
@albertcht albertcht added the bug Something isn't working label Jul 2, 2026
@albertcht albertcht changed the title Update backoff methods return type to include string fix: update backoff methods return type to include string Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants