Simple bundle of Symfony2

so many ifs, method realization is ugly