scrutinizer help:
* fix phpdoc
* remove code duplication