Algorithm for determining the genealogical relationship (consanguinity) between two members in a family tree, all contained within a simple PHP class.