mentException( self::class_name_without_namespace( __CLASS__ ) . '::' . __FUNCTION__ . ': the values array is empty' ); } return '(' . implode( ',', $values ) . ')'; } /** * Get the name of a class without the namespace. * * @param string $class_name The full class name. * @return string The class name without the namespace. */ public static function class_name_without_namespace( string $class_name ) { // A '?:' would convert this to a one-liner, but WP coding standards disallow these :shrug:. $result = substr( strrchr( $class_name, '\\' ), 1 ); return $result ? $result : $class_name; } }