src/Extension/FluentExtension.php
protected function anyMatch($value, $patterns)
    {
        // Test both explicit value, as well as the value stripped of any trailing parameters
        $valueBase = preg_replace('/\(.*/', '', $value);
        foreach ($patterns as $pattern) {
            if (strpos($pattern, '/') === 0) {
                // Assume value prefaced with '/' are regexp
                if (preg_match($pattern, $value) || preg_match($pattern, $valueBase)) {
                    return true;
                }
            } else {
                // Assume simple string comparison otherwise
                if ($pattern === $value || $pattern === $valueBase) {
                    return true;
                }
            }
        }
        return false;
    }
protected function anyMatch($value, $patterns)
    {
        // Test both explicit value, as well as the value stripped of any trailing parameters
        $valueBase = preg_replace('/\(.*/', '', $value);
        foreach ($patterns as $pattern) {
            if (strpos($pattern, '/') === 0) {
                // Assume value prefaced with '/' are regexp
                if (preg_match($pattern, $value) || preg_match($pattern, $valueBase)) {
                    return true;
                }
            } else {
                // Assume simple string comparison otherwise
                if ($pattern === $value || $pattern === $valueBase) {
                    return true;
                }
            }
        }
        return false;
    }
protected function anyMatch ( $ value , $ patterns ) { // Test both explicit value, as well as the value stripped of any trailing parameters $ valueBase = preg_replace ( '/\(.*/' , '' , $ value ) ; foreach ( $ patterns as $ pattern ) { if ( strpos ( $ pattern , '/' ) === 0 ) { // Assume value prefaced with '/' are regexp if ( preg_match ( $ pattern , $ value ) || preg_match ( $ pattern , $ valueBase ) ) { return true ; } } else { // Assume simple string comparison otherwise if ( $ pattern === $ value || $ pattern === $ valueBase ) { return true ; } } } return false ; }
Helper function to check if the value given is present in any of the patterns.
This function is case sensitive by default.

@param string $value A string value to check against, potentially with parameters (E.g. 'Varchar(1023)')
@param array $patterns A list of strings, some of which may be regular expressions
@return bool True if this $value is present in any of the $patterns
Helper function to check if the value given is present in any of the patterns . This function is case sensitive by default .