src/Behat/Behat/Gherkin/Specification/LazyFeatureIterator.php
private function createFilter($type, $filterString, Suite $suite)
    {
        if ('role' === $type) {
            return new RoleFilter($filterString);
        }

        if ('name' === $type) {
            return new NameFilter($filterString);
        }

        if ('tags' === $type) {
            return new TagFilter($filterString);
        }

        if ('narrative' === $type) {
            return new NarrativeFilter($filterString);
        }

        throw new SuiteConfigurationException(sprintf(
            '`%s` filter is not supported by the `%s` suite. Supported types are `%s`.',
            $type,
            $suite->getName(),
            implode('`, `', array('role', 'name', 'tags'))
        ), $suite->getName());
    }
private function createFilter($type, $filterString, Suite $suite)
    {
        if ('role' === $type) {
            return new RoleFilter($filterString);
        }

        if ('name' === $type) {
            return new NameFilter($filterString);
        }

        if ('tags' === $type) {
            return new TagFilter($filterString);
        }

        if ('narrative' === $type) {
            return new NarrativeFilter($filterString);
        }

        throw new SuiteConfigurationException(sprintf(
            '`%s` filter is not supported by the `%s` suite. Supported types are `%s`.',
            $type,
            $suite->getName(),
            implode('`, `', array('role', 'name', 'tags'))
        ), $suite->getName());
    }
private function createFilter ( $ type , $ filterString , Suite $ suite ) { if ( 'role' === $ type ) { return new RoleFilter ( $ filterString ) ; } if ( 'name' === $ type ) { return new NameFilter ( $ filterString ) ; } if ( 'tags' === $ type ) { return new TagFilter ( $ filterString ) ; } if ( 'narrative' === $ type ) { return new NarrativeFilter ( $ filterString ) ; } throw new SuiteConfigurationException ( sprintf ( '`%s` filter is not supported by the `%s` suite. Supported types are `%s`.' , $ type , $ suite -> getName ( ) , implode ( '`, `' , array ( 'role' , 'name' , 'tags' ) ) ) , $ suite -> getName ( ) ) ; }
Creates filter of provided type.

@param string $type
@param string $filterString
@param Suite  $suite

@return FilterInterface

@throws SuiteConfigurationException If filter type is not recognised
Creates filter of provided type .