BaselineInstantiationBench   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 5
dl 0
loc 27
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A benchInstantiationOfEmptyObject() 0 4 1
A benchInstantiationOfObjectWithPrivateProperties() 0 4 1
A benchInstantiationOfObjectWithProtectedProperties() 0 4 1
A benchInstantiationOfObjectWithPublicProperties() 0 4 1
A benchInstantiationOfObjectWithMixedProperties() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerBench;
6
7
use ProxyManagerTestAsset\ClassWithMixedProperties;
8
use ProxyManagerTestAsset\ClassWithPrivateProperties;
9
use ProxyManagerTestAsset\ClassWithProtectedProperties;
10
use ProxyManagerTestAsset\ClassWithPublicProperties;
11
use ProxyManagerTestAsset\EmptyClass;
12
13
/**
14
 * Benchmark that provides baseline results for simple object instantiation
15
 */
16
final class BaselineInstantiationBench
17
{
18
    public function benchInstantiationOfEmptyObject() : void
19
    {
20
        new EmptyClass();
21
    }
22
23
    public function benchInstantiationOfObjectWithPrivateProperties() : void
24
    {
25
        new ClassWithPrivateProperties();
26
    }
27
28
    public function benchInstantiationOfObjectWithProtectedProperties() : void
29
    {
30
        new ClassWithProtectedProperties();
31
    }
32
33
    public function benchInstantiationOfObjectWithPublicProperties() : void
34
    {
35
        new ClassWithPublicProperties();
36
    }
37
38
    public function benchInstantiationOfObjectWithMixedProperties() : void
39
    {
40
        new ClassWithMixedProperties();
41
    }
42
}
43