Code Duplication    Length = 11-11 lines in 2 locations

src/Charcoal/Admin/Widget/AttachmentWidget.php 1 location

@@ 666-676 (lines=11) @@
663
     * @throws RuntimeException If the widget factory was not previously set.
664
     * @return FactoryInterface
665
     */
666
    public function widgetFactory()
667
    {
668
        if (!isset($this->widgetFactory)) {
669
            throw new RuntimeException(sprintf(
670
                'Widget Factory is not defined for "%s"',
671
                get_class($this)
672
            ));
673
        }
674
675
        return $this->widgetFactory;
676
    }
677
678
    /**
679
     * Retrieve the language.

src/Charcoal/Admin/Widget/FormGroup/AttachmentFormGroup.php 1 location

@@ 212-222 (lines=11) @@
209
     * @return FactoryInterface
210
     * @throws RuntimeException If the widget factory was not previously set.
211
     */
212
    protected function widgetFactory()
213
    {
214
        if ($this->widgetFactory === null) {
215
            throw new RuntimeException(sprintf(
216
                'Widget Factory is not defined for "%s"',
217
                get_class($this)
218
            ));
219
        }
220
221
        return $this->widgetFactory;
222
    }
223
}
224