Code Duplication    Length = 8-8 lines in 3 locations

src/ZfcDatagrid/PrepareData.php 1 location

@@ 111-118 (lines=8) @@
108
     * @param  Translator                $translator
109
     * @throws \InvalidArgumentException
110
     */
111
    public function setTranslator($translator)
112
    {
113
        if (! $translator instanceof Translator && ! $translator instanceof \Zend\I18n\Translator\TranslatorInterface) {
114
            throw new \InvalidArgumentException('Translator must be an instanceof "Zend\I18n\Translator\Translator" or "Zend\I18n\Translator\TranslatorInterface"');
115
        }
116
117
        $this->translator = $translator;
118
    }
119
120
    /**
121
     *

src/ZfcDatagrid/Renderer/AbstractRenderer.php 1 location

@@ 421-428 (lines=8) @@
418
     * @param  Translator                $translator
419
     * @throws \InvalidArgumentException
420
     */
421
    public function setTranslator($translator)
422
    {
423
        if (! $translator instanceof Translator && ! $translator instanceof \Zend\I18n\Translator\TranslatorInterface) {
424
            throw new \InvalidArgumentException('Translator must be an instanceof "Zend\I18n\Translator\Translator" or "Zend\I18n\Translator\TranslatorInterface"');
425
        }
426
427
        $this->translator = $translator;
428
    }
429
430
    /**
431
     *

src/ZfcDatagrid/Datagrid.php 1 location

@@ 401-408 (lines=8) @@
398
     * @param  Translator                $translator
399
     * @throws \InvalidArgumentException
400
     */
401
    public function setTranslator($translator = null)
402
    {
403
        if (! $translator instanceof Translator && ! $translator instanceof \Zend\I18n\Translator\TranslatorInterface) {
404
            throw new \InvalidArgumentException('Translator must be an instanceof "Zend\I18n\Translator\Translator" or "Zend\I18n\Translator\TranslatorInterface"');
405
        }
406
407
        $this->translator = $translator;
408
    }
409
410
    /**
411
     *