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

PhpParserPerformanceWithShortCutBench::bench()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
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 Doctrine\Performance\Annotations;
6
7
use Doctrine\Annotations\PhpParser;
8
use Doctrine\Tests\Annotations\Fixtures\NamespacedSingleClassLOC1000;
9
use ReflectionClass;
10
11
/**
12
 * @BeforeMethods({"initialize"})
13
 */
14
final class PhpParserPerformanceWithShortCutBench
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(NamespacedSingleClassLOC1000::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