Update for symfony2.3

make if statement more readable