I know that it's juste about PHP CS fixer, but I don't understand how this function can be usefull.

Two possibilities :

Here, as this controller extends the FrameworkBundle Controller, you can use ``$this->get('session')->getFlashBag()->add($type, $message);``

OR

``$request->getSession()->getFlashBag()->add($type, $message);``