Code Duplication    Length = 15-15 lines in 2 locations

src/View/TwigView.php 2 locations

@@ 231-245 (lines=15) @@
228
     * @throws \Exception
229
     */
230
    // @codingStandardsIgnoreStart
231
    protected function _getViewFileName($name = null)
232
    {
233
        // @codingStandardsIgnoreEnd
234
        $rethrow = new \Exception('You\'re not supposed to get here');
235
        foreach ($this->extensions as $extension) {
236
            $this->_ext = $extension;
237
            try {
238
                return parent::_getViewFileName($name);
239
            } catch (\Exception $exception) {
240
                $rethrow = $exception;
241
            }
242
        }
243
244
        throw $rethrow;
245
    }
246
247
    /**
248
     * @param string|null $name
@@ 253-267 (lines=15) @@
250
     * @throws \Exception
251
     */
252
    // @codingStandardsIgnoreStart
253
    protected function _getLayoutFileName($name = null)
254
    {
255
        // @codingStandardsIgnoreEnd
256
        $rethrow = new \Exception('You\'re not supposed to get here');
257
        foreach ($this->extensions as $extension) {
258
            $this->_ext = $extension;
259
            try {
260
                return parent::_getLayoutFileName($name);
261
            } catch (\Exception $exception) {
262
                $rethrow = $exception;
263
            }
264
        }
265
266
        throw $rethrow;
267
    }
268
269
    /**
270
     * @param string $name