Code Duplication    Length = 10-10 lines in 2 locations

src/Translator.php 2 locations

@@ 331-340 (lines=10) @@
328
     *
329
     * @return string translated plural form
330
     */
331
    public function pgettext($msgctxt, $msgid)
332
    {
333
        $key = implode(chr(4), array($msgctxt, $msgid));
334
        $ret = $this->gettext($key);
335
        if (strpos($ret, chr(4)) !== false) {
336
            return $msgid;
337
        }
338
339
        return $ret;
340
    }
341
342
    /**
343
     * Plural version of pgettext.
@@ 352-361 (lines=10) @@
349
     *
350
     * @return string translated plural form
351
     */
352
    public function npgettext($msgctxt, $msgid, $msgidPlural, $number)
353
    {
354
        $key = implode(chr(4), array($msgctxt, $msgid));
355
        $ret = $this->ngettext($key, $msgidPlural, $number);
356
        if (strpos($ret, chr(4)) !== false) {
357
            return $msgid;
358
        }
359
360
        return $ret;
361
    }
362
363
    /**
364
     * Set translation in place