FullNameParser::get_nickname PHP Method

get_nickname() protected method

I removed the check for strings in single quotes 'string' due to possible conflicts with names that may include apostrophes. Arabic transliterations, for example
protected get_nickname ( string $name ) : mixed
$name string the name you wish to test against
return mixed returns nickname if exists, false otherwise
    protected function get_nickname($name)
    {
        if (preg_match("/[\\(|\"].*?[\\)|\"]/", $name, $matches)) {
            if (!in_array(strtolower($matches[0]), $this->not_nicknames)) {
                return $matches[0];
            } else {
                return false;
            }
        }
        return false;
    }