phpdoc refactoring, and added array type hints
phpdoc refactoring