src/services/WordsmithService.php
public function parseName($s) : array
	{

		$parts = FullNameParser::parse($s);

		return [
			'nickname' => $parts['nickname'] ?? '',
			'salutation' => $parts['salutation'],
			'givenName' => $parts['fname'],
			'firstName' => $parts['fname'],
			'initials' => $parts['initials'],
			'lastName' => $parts['lname'],
			'surname' => $parts['lname'],
			'lastNameBase' => $parts['lname_base'],
			'surnameBase' => $parts['lname_base'],
			'lastNameCompound' => $parts['lname_compound'],
			'surnameCompound' => $parts['lname_compound'],
			'suffix' => $parts['suffix'],
		];

	}
public function parseName($s) : array
	{

		$parts = FullNameParser::parse($s);

		return [
			'nickname' => $parts['nickname'] ?? '',
			'salutation' => $parts['salutation'],
			'givenName' => $parts['fname'],
			'firstName' => $parts['fname'],
			'initials' => $parts['initials'],
			'lastName' => $parts['lname'],
			'surname' => $parts['lname'],
			'lastNameBase' => $parts['lname_base'],
			'surnameBase' => $parts['lname_base'],
			'lastNameCompound' => $parts['lname_compound'],
			'surnameCompound' => $parts['lname_compound'],
			'suffix' => $parts['suffix'],
		];

	}
Attempts to parse a string as a name and returns its component parts (i.e. firstName, lastName, etc.)

c.f. FullNameParser::parse()

(We hijack the return to provide nicer key names than FullNameParser uses out of the box.)

@param $s
@return array