Skip to content
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

fix: type casting #26

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

michalsn
Copy link
Member

Description
This PR fixes #25

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn
Copy link
Member Author

Thanks!

@michalsn michalsn merged commit 047f77d into codeigniter4:develop Dec 19, 2023
11 checks passed
Comment on lines +59 to +61
if ($hours !== null) {
$hours = (int) $hours;
}
Copy link
Member

Choose a reason for hiding this comment

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

I like the ternary you switched to below.

Suggested change
if ($hours !== null) {
$hours = (int) $hours;
}
$hours = $hours === null ? null : (int) $hours;

@michalsn michalsn deleted the fix/type-casting branch December 21, 2023 13:28
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.

queue:work default - error after start job
3 participants