Code Duplication    Length = 17-17 lines in 2 locations

src/Core/Cache/StandardCacheWarmer.php 2 locations

@@ 156-172 (lines=17) @@
153
     * @param RenderingContextInterface $renderingContext
154
     * @return FluidCacheWarmupResult
155
     */
156
    protected function warmupPartialRootPaths(RenderingContextInterface $renderingContext)
157
    {
158
        $result = new FluidCacheWarmupResult();
159
        $paths = $renderingContext->getTemplatePaths();
160
        foreach ($this->formats as $format) {
161
            foreach ($paths->resolveAvailablePartialFiles($format) as $partialFile) {
162
                $paths->setFormat($format);
163
                $state = $this->warmSingleFile(
164
                    $partialFile,
165
                    $paths->getPartialIdentifier(basename($partialFile, '.' . $format)),
166
                    $renderingContext
167
                );
168
                $result->add($state, $partialFile);
169
            }
170
        }
171
        return $result;
172
    }
173
174
    /**
175
     * Warm up _layoutRootPaths_ of the provided RenderingContext's
@@ 187-203 (lines=17) @@
184
     * @param RenderingContextInterface $renderingContext
185
     * @return FluidCacheWarmupResult
186
     */
187
    protected function warmupLayoutRootPaths(RenderingContextInterface $renderingContext)
188
    {
189
        $result = new FluidCacheWarmupResult();
190
        $paths = $renderingContext->getTemplatePaths();
191
        foreach ($this->formats as $format) {
192
            foreach ($paths->resolveAvailableLayoutFiles($format) as $layoutFile) {
193
                $paths->setFormat($format);
194
                $state = $this->warmSingleFile(
195
                    $layoutFile,
196
                    $paths->getLayoutIdentifier(basename($layoutFile, '.' . $layoutFile)),
197
                    $renderingContext
198
                );
199
                $result->add($state, $layoutFile);
200
            }
201
        }
202
        return $result;
203
    }
204
205
    /**
206
     * Detect all available controller names in provided TemplateRootPaths