Completed
Pull Request — master (#465)
by Marco
25:06
created

MyProxiedClass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A sayHello() 0 4 1
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