Code Duplication    Length = 8-8 lines in 3 locations

src/ZfcDatagrid/Renderer/AbstractRenderer.php 1 location

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

src/ZfcDatagrid/Datagrid.php 1 location

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

src/ZfcDatagrid/PrepareData.php 1 location

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