Completed
Pull Request — master (#127)
by
unknown
02:46
created

BaseTranslator::noop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Gettext;
4
5
abstract class BaseTranslator implements TranslatorInterface
6
{
7
    /** @var TranslatorInterface */
8
    public static $current;
9
10
    /**
11
     * @see TranslatorInterface
12
     */
13
    public function noop($original)
14
    {
15
        return $original;
16
    }
17
18
    /**
19
     * @see TranslatorInterface
20
     */
21
    public function register()
22
    {
23
        $previous = self::$current;
24
25
        self::$current = $this;
26
27
        include_once __DIR__.'/translator_functions.php';
28
29
        return $previous;
30
    }
31
}
32