private function getIgnoreFilters(Composer $composer): array
    {
        $extra = $composer->getPackage()->getExtra();

        return array_map(
            function (string $rule) : ViolationFilterInterface {
                $filters = [
                    new ExactPackageFilter($rule),
                    new PatternPackageFilter($rule)
                ];

                if (preg_match('#/$#', $rule)) {
                    $filters[] = new VendorFilter($rule);
                }

                return new ViolationFilterChain(...$filters);
            },
            $extra['dependency-guard']['ignore'] ?? []
        );
    }
private function getIgnoreFilters(Composer $composer): array
    {
        $extra = $composer->getPackage()->getExtra();

        return array_map(
            function (string $rule) : ViolationFilterInterface {
                $filters = [
                    new ExactPackageFilter($rule),
                    new PatternPackageFilter($rule)
                ];

                if (preg_match('#/$#', $rule)) {
                    $filters[] = new VendorFilter($rule);
                }

                return new ViolationFilterChain(...$filters);
            },
            $extra['dependency-guard']['ignore'] ?? []
        );
    }
private function getIgnoreFilters ( Composer $ composer ) : array { $ extra = $ composer -> getPackage ( ) -> getExtra ( ) ; return array_map ( function ( string $ rule ) : ViolationFilterInterface { $ filters = [ new ExactPackageFilter ( $ rule ) , new PatternPackageFilter ( $ rule ) ] ; if ( preg_match ( '#/$#' , $ rule ) ) { $ filters [ ] = new VendorFilter ( $ rule ) ; } return new ViolationFilterChain ( ... $ filters ) ; } , $ extra [ 'dependency-guard' ] [ 'ignore' ] ?? [ ] ) ; }
Get the violation filters for the ignore rules in the given Composer instance.

@param Composer $composer

@return ViolationFilterInterface[]
Get the violation filters for the ignore rules in the given Composer instance .