protected function isApplicablePrefix(array $parts, int $index): bool
    {
        if (!$this->isPrefix($parts[$index])) {
            return false;
        }

        return $this->hasUnmappedPartsBefore($parts, $index);
    }
protected function isApplicablePrefix(array $parts, int $index): bool
    {
        if (!$this->isPrefix($parts[$index])) {
            return false;
        }

        return $this->hasUnmappedPartsBefore($parts, $index);
    }
protected function isApplicablePrefix ( array $ parts , int $ index ) : bool { if ( ! $ this -> isPrefix ( $ parts [ $ index ] ) ) { return false ; } return $ this -> hasUnmappedPartsBefore ( $ parts , $ index ) ; }
Assuming that the part at the given index is matched as a prefix,
determines if the prefix should be applied to the lastname.

We only apply it to the lastname if we already have at least one
lastname part and there are other parts left in
the name (this effectively prioritises firstname over prefix matching).

This expects the parts array and index to be in the original order.

@param array $parts
@param int $index
@return bool
Assuming that the part at the given index is matched as a prefix determines if the prefix should be applied to the lastname .