Completed
Push — master ( 6dd56a...f17316 )
by Jakub
05:55
created

ManualLocaleResolver::getLang()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 2
ccs 0
cts 1
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Translation\Resolvers;
5
6
use Nexendrie\Translation\ISettableLocaleResolver;
7
8
/**
9
 * ManualLocaleResolver
10
 * Allows you to manually specify current language
11
 *
12
 * @author Jakub Konečný
13
 */
14 1
final class ManualLocaleResolver implements ISettableLocaleResolver {
15
  use \Nette\SmartObject;
16
17
  public ?string $lang = null;
18
19
  /**
20
   * @deprecated Access the property directly
21
   */
22
  public function getLang(): ?string {
23
    return $this->lang;
24
  }
25
26
  /**
27
   * @deprecated Access the property directly
28
   */
29
  public function setLang(?string $lang): void {
30 1
    $this->lang = $lang;
31 1
  }
32
  
33
  public function resolve(): ?string {
34 1
    return $this->lang;
35
  }
36
}
37
?>