Nil   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 73
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __get() 0 3 1
A __toString() 0 3 1
A __isset() 0 3 1
A __callStatic() 0 3 1
A __set() 0 3 1
A __call() 0 3 1
1
<?php
2
3
/**
4
 * Bluz Framework Component
5
 *
6
 * @copyright Bluz PHP Team
7
 * @link      https://github.com/bluzphp/framework
8
 */
9
10
declare(strict_types=1);
11
12
namespace Bluz\Common;
13
14
/**
15
 * It's just null class
16
 *
17
 * @package  Bluz\Common
18
 * @author   Anton Shevchuk
19
 * @link     https://github.com/bluzphp/framework/wiki/Trait-Nil
20
 *
21
 * @method   null get($key)
22
 * @method   null set($key, $value)
23
 */
24
class Nil
25
{
26
    /**
27
     * Magic call
28
     *
29
     * @param  string $method
30
     * @param  array  $args
31
     *
32
     * @return null
33
     */
34 1
    public function __call($method, $args)
35
    {
36 1
        return null;
37
    }
38
39
    /**
40
     * Magic call for static
41
     *
42
     * @param  string $method
43
     * @param  array  $args
44
     *
45
     * @return null
46
     */
47 1
    public static function __callStatic($method, $args)
48
    {
49 1
        return null;
50
    }
51
52
    /**
53
     * Magic __get
54
     *
55
     * @param  string $key
56
     *
57
     * @return null
58
     */
59 1
    public function __get($key)
60
    {
61 1
        return null;
62
    }
63
64
    /**
65
     * Magic __set
66
     *
67
     * @param  string $key
68
     * @param  mixed  $value
69
     *
70
     * @return null
71
     */
72 1
    public function __set($key, $value)
73
    {
74 1
        return null;
75
    }
76
77
    /**
78
     * Magic __isset
79
     *
80
     * @param  string $key
81
     *
82
     * @return false
83
     */
84 1
    public function __isset($key)
85
    {
86 1
        return false;
87
    }
88
89
    /**
90
     * Cast to empty string
91
     *
92
     * @return string
93
     */
94 1
    public function __toString()
95
    {
96 1
        return '';
97
    }
98
}
99