use trait in template
fix typo in phpdoc
add phpunit config and tests folder