NullProxy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A instance() 0 3 2
1
<?php
2
3
namespace Lneicelis\Transformer\ValueObject;
4
5
class NullProxy extends ArrayProxy
6
{
7
    static $instance;
8
9 2
    public static function instance(): self
10
    {
11 2
        return self::$instance = self::$instance ?: new static([]);
12
    }
13
}
14