Completed
Pull Request — master (#465)
by Marco
21:30
created

MyProxiedClass::sayHello()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace StaticAnalysis\NullObject;
4
5
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
6
use ProxyManager\Factory\NullObjectFactory;
7
use ProxyManager\Proxy\LazyLoadingInterface;
8
9
require_once __DIR__ . '/../../vendor/autoload.php';
10
11
class MyProxiedClass
12
{
13
    public function sayHello() : ?string
14
    {
15
        return 'Hello!';
16
    }
17
}
18
19
echo (new NullObjectFactory())
20
    ->createProxy(MyProxiedClass::class)
21
    ->sayHello();
22
23
echo (new NullObjectFactory())
24
    ->createProxy(new MyProxiedClass())
25
    ->sayHello();
26