private static function assertCollectionAlike($collection, $className, $callee, $parameterPosition)
{
if (!is_array($collection) && !$collection instanceof $className) {
throw new static(sprintf('%s() expects parameter %d to be array or instance of %s', $callee, $parameterPosition, $className));
}
}