That's just a copy of this: https://github.com/ruudk/FOSElasticaBundle/blob/f27fa68e3dcde1ac03fa24aae269a1d0512036ac/Resetter.php#L89