This commit adds a third parameter to transition_item() for the item ID to be passed directly into it rather than derived from the old data.
Previously, it was possible that the old data would be of a mixed type, potentially an integer in the case of a newly added item. This was weird and confusing. Now old data will just be an empty array (because there is no old data) and the third parameter will include the item ID which is known from the previous MySQL query result.
Additionally, this commit updates a bunch of inline docs relative to when shape_item_id() is called to make everything consistent where it makes sense.
This commit adds a third parameter to transition_item() for the item ID to be passed directly into it rather than derived from the old data.
Previously, it was possible that the old data would be of a mixed type, potentially an integer in the case of a newly added item. This was weird and confusing. Now old data will just be an empty array (because there is no old data) and the third parameter will include the item ID which is known from the previous MySQL query result.
Additionally, this commit updates a bunch of inline docs relative to when shape_item_id() is called to make everything consistent where it makes sense.
Fixes #113.