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

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