Code Duplication    Length = 8-8 lines in 3 locations

src/ZfcDatagrid/Renderer/AbstractRenderer.php 1 location

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

src/ZfcDatagrid/Datagrid.php 1 location

@@ 377-384 (lines=8) @@
374
     *
375
     * @throws \InvalidArgumentException
376
     */
377
    public function setTranslator($translator = null)
378
    {
379
        if (!$translator instanceof Translator && !$translator instanceof \Zend\I18n\Translator\TranslatorInterface) {
380
            throw new \InvalidArgumentException('Translator must be an instanceof "Zend\I18n\Translator\Translator" or "Zend\I18n\Translator\TranslatorInterface"');
381
        }
382
383
        $this->translator = $translator;
384
    }
385
386
    /**
387
     * @return Translator

src/ZfcDatagrid/PrepareData.php 1 location

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