Completed
Pull Request — master (#410)
by Anton
07:16
created

Nil::__isset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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