private function checkMapNames(array $map): void
    {
        $names = array_keys($map);
        $bad_names = preg_grep(self::RE_NAME, $names, PREG_GREP_INVERT);
        if ($bad_names) {
            throw new \InvalidArgumentException(
                'Bad names: ' . join(', ', $bad_names)
            );
        }
    }
private function checkMapNames(array $map): void
    {
        $names = array_keys($map);
        $bad_names = preg_grep(self::RE_NAME, $names, PREG_GREP_INVERT);
        if ($bad_names) {
            throw new \InvalidArgumentException(
                'Bad names: ' . join(', ', $bad_names)
            );
        }
    }
private function checkMapNames ( array $ map ) : void { $ names = array_keys ( $ map ) ; $ bad_names = preg_grep ( self :: RE_NAME , $ names , PREG_GREP_INVERT ) ; if ( $ bad_names ) { throw new \ InvalidArgumentException ( 'Bad names: ' . join ( ', ' , $ bad_names ) ) ; } }
Check names in regexps map for validity
@param array $map Map of regexp parts to check
Check names in regexps map for validity