Is there a nvim plugin to convert a PHP regular function to an arrow function? [closed]

I’m looking for a plugin (and did not find any), that converts a regular php function like

->when(true, function ($query) {
  $query->where('foo', true);
})

into

->when(true, fn ($query) => $query->where('foo', true))

I don’t know if something like this would be done by a plugin or a snippet or something like that.