Completed
Push — master ( 0db171...1a2763 )
by Oscar
02:01
created

BaseTranslator::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 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 register()
14
    {
15
        $previous = self::$current;
16
17
        self::$current = $this;
18
19
        include_once __DIR__.'/translator_functions.php';
20
21
        return $previous;
22
    }
23
}
24