I'm not sure if this is an error, as the code should check in a better way but I have come across the following
https://phpstan.org/r/051b7ab22cbb5241e32200e723a0bf3c
This should use instanceof ideally which resolves the issue, just wondering if code like this should also verify ?
Using something like
switch ($object->getType()) {
case something::class :
}
vs
switch (true) {
case $object instanceof something :
}
I'm not sure if this is an error, as the code should check in a better way but I have come across the following
https://phpstan.org/r/051b7ab22cbb5241e32200e723a0bf3c
This should use instanceof ideally which resolves the issue, just wondering if code like this should also verify ?
Using something like
vs