Code Duplication    Length = 10-10 lines in 2 locations

src/Translator.php 2 locations

@@ 315-324 (lines=10) @@
312
     *
313
     * @return string translated plural form
314
     */
315
    public function pgettext($msgctxt, $msgid)
316
    {
317
        $key = implode(chr(4), array($msgctxt, $msgid));
318
        $ret = $this->gettext($key);
319
        if (strpos($ret, chr(4)) !== false) {
320
            return $msgid;
321
        }
322
323
        return $ret;
324
    }
325
326
    /**
327
     * Plural version of pgettext.
@@ 336-345 (lines=10) @@
333
     *
334
     * @return string translated plural form
335
     */
336
    public function npgettext($msgctxt, $msgid, $msgidPlural, $number)
337
    {
338
        $key = implode(chr(4), array($msgctxt, $msgid));
339
        $ret = $this->ngettext($key, $msgidPlural, $number);
340
        if (strpos($ret, chr(4)) !== false) {
341
            return $msgid;
342
        }
343
344
        return $ret;
345
    }
346
}
347