Actually according to: https://getcomposer.org/doc/01-basic-usage.md#package-versions  
~ (Tilde operator) would work with >=1.5.1 and <2.0 which should be stable and sufficient as far as making sure that the required functionality is there. 

=1.5.1 would create problems if a new version of php_codesniffer is released.

P.S. I did test this locally and it works fine for me.