use requires annotation and fix code coverage for php 5.3