Code Duplication    Length = 8-8 lines in 3 locations

src/ZfcDatagrid/Datagrid.php 1 location

@@ 392-399 (lines=8) @@
389
     * @param  Translator                $translator
390
     * @throws \InvalidArgumentException
391
     */
392
    public function setTranslator($translator = null)
393
    {
394
        if (! $translator instanceof Translator && ! $translator instanceof \Zend\I18n\Translator\TranslatorInterface) {
395
            throw new \InvalidArgumentException('Translator must be an instanceof "Zend\I18n\Translator\Translator" or "Zend\I18n\Translator\TranslatorInterface"');
396
        }
397
398
        $this->translator = $translator;
399
    }
400
401
    /**
402
     *

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
     *