avoid logical operators - replaced 'and' by '&&'

"The and operator does not have the same precedence as &&. This could lead to unexpected behavior, use && instead."
see : https://insight.sensiolabs.com/projects/eedbee2c-cfb3-4642-a8e3-eb319b909987/analyses/1