src/Matcher/MatcherFactory.php
public function adaptAll(array $values): array
    {
        $matchers = [];

        foreach ($values as $value) {
            if (
                $value instanceof Matcher ||
                $value instanceof WildcardMatcher
            ) {
                $matchers[] = $value;

                continue;
            }

            if (is_object($value)) {
                foreach ($this->driverIndex as $className => $driver) {
                    if (is_a($value, $className)) {
                        $matchers[] = $driver->wrapMatcher($value);

                        continue 2;
                    }
                }
            }

            if ('*' === $value) {
                $matchers[] = $this->wildcardAnyMatcher;
            } elseif ('~' === $value) {
                $matchers[] = $this->anyMatcher;
            } else {
                $matchers[] = new EqualToMatcher($value, true, $this->exporter);
            }
        }

        return $matchers;
    }
public function adaptAll(array $values): array
    {
        $matchers = [];

        foreach ($values as $value) {
            if (
                $value instanceof Matcher ||
                $value instanceof WildcardMatcher
            ) {
                $matchers[] = $value;

                continue;
            }

            if (is_object($value)) {
                foreach ($this->driverIndex as $className => $driver) {
                    if (is_a($value, $className)) {
                        $matchers[] = $driver->wrapMatcher($value);

                        continue 2;
                    }
                }
            }

            if ('*' === $value) {
                $matchers[] = $this->wildcardAnyMatcher;
            } elseif ('~' === $value) {
                $matchers[] = $this->anyMatcher;
            } else {
                $matchers[] = new EqualToMatcher($value, true, $this->exporter);
            }
        }

        return $matchers;
    }
public function adaptAll ( array $ values ) : array { $ matchers = [ ] ; foreach ( $ values as $ value ) { if ( $ value instanceof Matcher || $ value instanceof WildcardMatcher ) { $ matchers [ ] = $ value ; continue ; } if ( is_object ( $ value ) ) { foreach ( $ this -> driverIndex as $ className => $ driver ) { if ( is_a ( $ value , $ className ) ) { $ matchers [ ] = $ driver -> wrapMatcher ( $ value ) ; continue 2 ; } } } if ( '*' === $ value ) { $ matchers [ ] = $ this -> wildcardAnyMatcher ; } elseif ( '~' === $ value ) { $ matchers [ ] = $ this -> anyMatcher ; } else { $ matchers [ ] = new EqualToMatcher ( $ value , true , $ this -> exporter ) ; } } return $ matchers ; }
Create new matchers for the all supplied values.

@param array $values The values to create matchers for.

@return array<Matchable> The newly created matchers.
Create new matchers for the all supplied values .