phpc.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A server for PHP programmers & friends. Join us for discussions on the PHP programming language, frameworks, packages, tools, open source, tech, life, and more.

Administered by:

Server stats:

833
active users

Ben Ramsey

I'm trying to figure out the proper way to tell that the $initial parameter in this method can be either the templated type `TCarry` or `null`. It's mostly working, but it doesn't like the `null` value. It wants to always require a value of type `TCarry`.

Any thoughts or pointers? Maybe I'm thinking about this the wrong way?

psalm.dev/r/161b06f36c

psalm.devPsalm - a static analysis tool for PHP