Code Duplication    Length = 8-8 lines in 3 locations

src/ZfcDatagrid/Datagrid.php 1 location

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

src/ZfcDatagrid/PrepareData.php 1 location

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

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