New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decrement mutator makes array indexes negative #1270
Comments
Negative indexes in an array are not forbidden. You can totally have an array with a negative index. |
right, but from my experience with this mutator, each time it decrements
which in its turn always leads to killed Mutant. So, I think this is a useless mutation in almost 100% cases. I'm speaking only about In other words, I propose to not do such mutation if:
|
thank you for labelling issues - I will try to pick up this bug +) |
sure, as I said:
So, there are many cases when I have similar code to this: $items = $object->getItems();
Assert::greaterThan(0, $items); // here we know that there is at least 1 item
$firstItem = $items[0]; So, when we have a list of items (array indexed from
In other words, rephrasing my previous comment, we should not do a mutations from |
php -v
)This should not happen
The text was updated successfully, but these errors were encountered: