Code Duplication    Length = 10-10 lines in 2 locations

src/Translator.php 2 locations

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