Completed
Push — trunk ( 0e7a2e...6a6c5e )
by SuperNova.WS
07:28
created

NullContainer   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A clear() 0 1 1
A __get() 0 2 1
A isEmpty() 0 2 1
A __set() 0 1 1
A __isset() 0 2 1
A __unset() 0 1 1
1
<?php
2
/**
3
 * Created by Gorlum 08.01.2018 15:31
4
 */
5
6
namespace Common;
7
8
use Core\Singleton;
9
10
class NullContainer extends Singleton implements Interfaces\IContainer {
11
12
  public function __set($name, $value) {
13
  }
14
15
  public function __isset($name) {
16
    return false;
17
  }
18
19
  public function __get($name) {
20
    return null;
21
  }
22
23
  public function __unset($name) {
24
  }
25
26
  /**
27
   * Is container contains no data
28
   *
29
   * @return bool
30
   */
31
  public function isEmpty() {
32
    return true;
33
  }
34
35
  /**
36
   * Clears container contents
37
   */
38
  public function clear() {
39
  }
40
41
}
42