Tidied ResultAdapter.php code