#PHPStan experts: Is it possible to exclude something from a type? Afaik, PHPSta...

@shaedrich@mastodon.online

#PHPStan experts: Is it possible to exclude something from a type? Afaik, PHPStan doesn't have a concept of "negative types", but maybe, there's a trick or something 🤔

phpstan.org/r/a5aa1930-0758-46

What I would like to achieve, is typing the $disk (DestinationDisk generic) parameter of copyToDisk as a string but not $this->disk (Disk generic). Is that possible?

#FollowerPower #amCoding #amProgramming #dataTypes #softwareDevelopment #softwareEngineering #PHP