Code Duplication    Length = 11-13 lines in 2 locations

src/EventListener/InvalidationListener.php 1 location

@@ 71-81 (lines=11) @@
68
     * @param UrlGeneratorInterface   $urlGenerator
69
     * @param ExpressionLanguage|null $expressionLanguage
70
     */
71
    public function __construct(
72
        CacheManager $cacheManager,
73
        UrlGeneratorInterface $urlGenerator,
74
        RuleMatcherInterface $mustInvalidateRule,
75
        ExpressionLanguage $expressionLanguage = null
76
    ) {
77
        $this->cacheManager = $cacheManager;
78
        $this->urlGenerator = $urlGenerator;
79
        $this->expressionLanguage = $expressionLanguage ?: new ExpressionLanguage();
80
        $this->mustInvalidateRule = $mustInvalidateRule;
81
    }
82
83
    /**
84
     * Apply invalidators and flush cache manager.

src/EventListener/TagListener.php 1 location

@@ 64-76 (lines=13) @@
61
     * @param SymfonyResponseTagger   $tagHandler
62
     * @param ExpressionLanguage|null $expressionLanguage
63
     */
64
    public function __construct(
65
        CacheManager $cacheManager,
66
        SymfonyResponseTagger $tagHandler,
67
        RuleMatcherInterface $cacheableRule,
68
        RuleMatcherInterface $mustInvalidateRule,
69
        ExpressionLanguage $expressionLanguage = null
70
    ) {
71
        $this->cacheManager = $cacheManager;
72
        $this->symfonyResponseTagger = $tagHandler;
73
        $this->cacheableRule = $cacheableRule;
74
        $this->mustInvalidateRule = $mustInvalidateRule;
75
        $this->expressionLanguage = $expressionLanguage ?: new ExpressionLanguage();
76
    }
77
78
    /**
79
     * Process the _tags request attribute, which is set when using the Tag