Code Duplication    Length = 9-9 lines in 3 locations

src/Control/RSS/RSSFeed.php 1 location

@@ 273-281 (lines=9) @@
270
     *
271
     * @return array
272
     */
273
    public function getTemplates()
274
    {
275
        $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);
276
        // Prefer any custom template
277
        if ($this->getTemplate()) {
278
            array_unshift($templates, $this->getTemplate());
279
        }
280
        return $templates;
281
    }
282
}
283

src/Forms/GridField/GridFieldDetailForm_ItemRequest.php 1 location

@@ 537-545 (lines=9) @@
534
     *
535
     * @return array
536
     */
537
    public function getTemplates()
538
    {
539
        $templates = SSViewer::get_templates_by_class($this, '', __CLASS__);
540
        // Prefer any custom template
541
        if ($this->getTemplate()) {
542
            array_unshift($templates, $this->getTemplate());
543
        }
544
        return $templates;
545
    }
546
547
    /**
548
     * @return Controller

src/Forms/Form.php 1 location

@@ 1003-1011 (lines=9) @@
1000
     *
1001
     * @return array
1002
     */
1003
    public function getTemplates()
1004
    {
1005
        $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);
1006
        // Prefer any custom template
1007
        if ($this->getTemplate()) {
1008
            array_unshift($templates, $this->getTemplate());
1009
        }
1010
        return $templates;
1011
    }
1012
1013
    /**
1014
     * Returns the encoding type for the form.