Refactored phpcomplete#GetClassName to scan the file only once