Removed duplicate SortBy setting
Fixed typo in variable name
Converted Doxygen to PHPDoc