- Code: Select all
$backend->get("/latestactivity", function(Silex\Application $app) {
global $bolt_version, $app;
But $app is already injected by function paremeter. global $app - what for?
$bolt_version - should it be stored somewhere in $app['version'] for better incapsulation?
Also you define a lot of functions in global namespace - may be try to put them in some Bolt namespace?
All these question are about code style and may be not so important, especially when you do a "lightweight" solution. What is your philisophy about code cleanness?