benchInstantiationOfEmptyObject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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