You are right, $nonNumericFound should be moved outside the foreach loop. Updated the pr. 

The main logic with the pr was meant to be:
1. In first hand, use a column named "title" or "name"
2. If none exist, use the first non-numeric column found.
3. If no non-numeric column is available, use the primary key.

Regarding "<-- Should we make this configurable?": Maybe, but currently, there are 3-4 different if/then statements checking fields and supplying "convention over coding"-style generation of code. We should make it all configurable or keep it all in the code :)