public function whereKeysLike($patterns)
    {
        if (! $patterns instanceof Collection) {
            $patterns = new Collection((array) $patterns);
        }

        /* @var Collection $patterns */

        if ($patterns->filter()->isEmpty()) {
            return new static($this->all());
        }

        /**
         * Return a subset of pairs that match any of the given patterns.
         */
        return $this->pairs()->filter(function (LineInterface $line) use ($patterns) {
            return $patterns->contains(function ($index, $pattern) use ($line) {
                return fnmatch($pattern, $line->key());
            });
        });
    }
public function whereKeysLike($patterns)
    {
        if (! $patterns instanceof Collection) {
            $patterns = new Collection((array) $patterns);
        }

        /* @var Collection $patterns */

        if ($patterns->filter()->isEmpty()) {
            return new static($this->all());
        }

        /**
         * Return a subset of pairs that match any of the given patterns.
         */
        return $this->pairs()->filter(function (LineInterface $line) use ($patterns) {
            return $patterns->contains(function ($index, $pattern) use ($line) {
                return fnmatch($pattern, $line->key());
            });
        });
    }
public function whereKeysLike ( $ patterns ) { if ( ! $ patterns instanceof Collection ) { $ patterns = new Collection ( ( array ) $ patterns ) ; } /* @var Collection $patterns */ if ( $ patterns -> filter ( ) -> isEmpty ( ) ) { return new static ( $ this -> all ( ) ) ; } /**
         * Return a subset of pairs that match any of the given patterns.
         */ return $ this -> pairs ( ) -> filter ( function ( LineInterface $ line ) use ( $ patterns ) { return $ patterns -> contains ( function ( $ index , $ pattern ) use ( $ line ) { return fnmatch ( $ pattern , $ line -> key ( ) ) ; } ) ; } ) ; }
Get a subset of lines where the key matches at least one of the given glob-style patterns.

@param string|array|Collection $patterns

@return static
Get a subset of lines where the key matches at least one of the given glob - style patterns .