/**
* Middleware that pushes history data to an ArrayAccess container.
*
- * @param array $container Container to hold the history (by reference).
+ * @param array|\ArrayAccess $container Container to hold the history (by reference).
*
* @return callable Returns a function that accepts the next handler.
* @throws \InvalidArgumentException if container is not an array or ArrayAccess.