No description provided.
Fix confusing return statement
Notice: This patch should be fine, but I am not able to run phpunit for some reason.
I think here we're assuming that $offset is also an array when you pass $value as null, but the null value might be a mistake, so probably best to check
if($value === null && is_array($offset))
Yeah, the array notation was making me frustrating simply because I didn't investigate that use case enough atm.
Should be fixed by adding more tests
I'm wondering why the return and $this->offsetUnset() aren't on the same line, this is forcing a void return value, will the function now always return void?
What's your stand on this.. PS, we (my company) are about to be using cookie class in production so it's getting thrown into the deep end :)
Well, you was the one who complained about the return statement ;-)
But this version might be better as it could avoid confusions.
Once we discuss the above 2 points, this can get merged and unit tests verified to be running.
Good work @avdg as usual :-)
Have my comments/concerns been resolved? I couldn't see at a glance.