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 some return types #3061

Merged
merged 4 commits into from
Jan 26, 2021
Merged

Fix some return types #3061

merged 4 commits into from
Jan 26, 2021

Conversation

distantnative
Copy link
Member

  • PageActions:: createNum() should always return int, so we need to type cast the result of date()
  • Location::num() should also be type casted to a float if only one part exist
  • F:: niceSize() never returns an int, always just string
  • Iterator::indexOf()always returns the int index position (or false) but never a string key of an associative array, since we use array_key(). This has been the behavior so far, so we're only fixing the description.
  • Pagination: ceil() still returns a float, so we need to cast it to an int
  • Str::isUrl(): filter_var will return false or the value - so we need to explicitly check that the return is not false

@distantnative distantnative added type: bug 🐛 Is a bug; fixes a bug type: refactoring ♻️ Is about bad code; cleans up code labels Jan 5, 2021
@distantnative distantnative added this to the 3.5.1 milestone Jan 5, 2021
@distantnative distantnative self-assigned this Jan 5, 2021
@bastianallgeier
Copy link
Member

What's the state on this? @distantnative should we move it to the next release or 3.6?

@distantnative
Copy link
Member Author

I just need to add one comment with a todo for 3.6 over the weekend. Then it's good to go. Think 3.5.1 still works

@bastianallgeier bastianallgeier modified the milestones: 3.5.1, 3.5.x Jan 12, 2021
@bastianallgeier bastianallgeier modified the milestones: 3.5.x, 3.5.2 Jan 25, 2021
@bastianallgeier
Copy link
Member

@distantnative any chance to get this fixed and merged quickly?

@distantnative
Copy link
Member Author

@bastianallgeier sorry totally forgot about this. added the TODO message

@bastianallgeier bastianallgeier merged commit 73c89d4 into develop Jan 26, 2021
@bastianallgeier bastianallgeier deleted the fix/return-types branch January 26, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug type: refactoring ♻️ Is about bad code; cleans up code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants