Fixed incorrect return type

Minor fix. Only affects type hinting in IDEs and phpdoc generation.