Passed
Push — phpbench ( ffc4ab )
by Michael
02:36
created

PhpParserPerformanceWithoutShortCutBench   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 4 1
A bench() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Performance\Annotations;
6
7
use Doctrine\Annotations\PhpParser;
8
use ReflectionClass;
9
use SingleClassLOC1000;
10
11
/**
12
 * @BeforeMethods({"initialize"})
13
 */
14
final class PhpParserPerformanceWithoutShortCutBench
15
{
16
    /** @var ReflectionClass */
17
    private $class;
18
19
    /** @var PhpParser */
20
    private $parser;
21
22
    public function initialize() : void
23
    {
24
        $this->class  = new ReflectionClass(SingleClassLOC1000::class);
25
        $this->parser = new PhpParser();
26
    }
27
28
    /**
29
     * @Revs(500)
30
     * @Iterations(5)
31
     */
32
    public function bench() : void
33
    {
34
        $this->parser->parseClass($this->class);
35
    }
36
}
37