Skip to content

[12.x] Improve PHPDoc for the Illuminate\Cache folder files #56028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

JordanchoEftimov
Copy link
Contributor

Improved PHPDoc comments in the Illuminate\Cache folder to enhance code readability and IDE support. No functional changes.

@JordanchoEftimov JordanchoEftimov changed the title Improve PHPDoc for the Illuminate\Cache folder files [12.x] Improve PHPDoc for the Illuminate\Cache folder files Jun 12, 2025
@@ -44,6 +44,7 @@ class DatabaseLock extends Lock
* @param int $seconds
* @param string|null $owner
* @param array $lottery
* @param int $defaultTimeoutInSeconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich gehe mal davon aus, dass die Zahl nicht negativ sein kann:

Suggested change
* @param int $defaultTimeoutInSeconds
* @param non-negative-int $defaultTimeoutInSeconds

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that the time can not be negative.

This is better than Duolingo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, sorry. Wasn't thinking apparently 😅 🤦🏻‍♂️

@@ -169,6 +170,7 @@ public function put($key, $value, $seconds)
/**
* Store multiple items in the cache for a given number of seconds.
*
* @param array $values
* @param int $seconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably as well:

Suggested change
* @param int $seconds
* @param non-negative-int $seconds

@@ -108,6 +108,7 @@ public function put($key, $value, $seconds)
/**
* Store multiple items in the cache for a given number of seconds.
*
* @param array $values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since prefix() expects a string, so this can be reflected here:

Suggested change
* @param array $values
* @param array<string, mixed> $values

@taylorotwell
Copy link
Member

This PR has conflicts.

@taylorotwell taylorotwell marked this pull request as draft June 13, 2025 13:59
@JordanchoEftimov
Copy link
Contributor Author

This PR has conflicts.

Conflicts resolved.

@JordanchoEftimov JordanchoEftimov marked this pull request as ready for review June 13, 2025 14:56
@taylorotwell taylorotwell merged commit 6d3fbc5 into laravel:12.x Jun 13, 2025
60 checks passed
@JordanchoEftimov JordanchoEftimov deleted the cache-phpdoc branch June 13, 2025 23:27
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.

4 participants