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

Update IsNode.php #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ElonSmithee
Copy link

No description provided.

@ElonSmithee ElonSmithee requested a review from a team as a code owner May 18, 2022 14:44
@hollabaq86
Copy link
Contributor

👋 @ElonSmithee can we get some context on these changes? Why do we need them? What is the problem that this PR solves? Just trying to get some additional info behind these changes. thanks!

@ElonSmithee
Copy link
Author

ElonSmithee commented May 18, 2022

This object type screams allover IDE trying to pass simple string, It’s redundant to inform that object must be passed and then convert it to string. Let user decide which way data will be converted. Will it be magical _toString, custom toString, simple cast or straight string.

upd. If string not what you wish, add dochints with multiple choices

@params mixed|object|string $var

@crookedneighbor
Copy link
Contributor

@ElonSmithee would this change prevent an IDE from allowing the dev to pass, say, a number and have it automatically be coerced to a string?

@ElonSmithee
Copy link
Author

@ElonSmithee would this change prevent an IDE from allowing the dev to pass, say, a number and have it automatically be coerced to a string?

They will notice type inconsistency and will cast it manualy

@hollabaq86
Copy link
Contributor

for internal use, ticket 2003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants