@aik099 these formatting changes for the JS functions are because they are done when running the PHP-CS-Fixer (because of its rule for PHP closures), and I think this is nice enough in JS code to avoid the pain of reverting these changes after applying the PHP-CS-Fixer.

But if you want to apply the PHP-CS-Fxier yourself, be careful that some changes applied in the JS strings need to reverted (``else if`` changed to ``elseif`` for instance, as the space is mandatory in JS)