rearchive_reports_in_past_last_n_months already has
last_n in the name but still expects to configure
last4 as value for example. Goal of this issue is that
4(which comes from
strlen('last')) but would instead do something like
str_replace('last', '', $lastNMonthsToInvalidate)which be more readable.
Note same code seems to be also in 2 places in Custom Reports where it would needs to be fixed too