braintree_php icon indicating copy to clipboard operation
braintree_php copied to clipboard

Update IsNode.php

Open ElonSmithee opened this issue 2 years ago • 5 comments

ElonSmithee avatar May 18 '22 14:05 ElonSmithee

👋 @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!

hollabaq86 avatar May 18 '22 14:05 hollabaq86

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

ElonSmithee avatar May 18 '22 17:05 ElonSmithee

@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?

crookedneighbor avatar May 18 '22 17:05 crookedneighbor

@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

ElonSmithee avatar May 18 '22 17:05 ElonSmithee

for internal use, ticket 2003

hollabaq86 avatar Oct 03 '22 22:10 hollabaq86