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

DocLexerPerformanceBench::initialize()   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\DocLexer;
8
9
/**
10
 * @BeforeMethods({"initializeMethod", "initialize"})
11
 */
12
final class DocLexerPerformanceBench
13
{
14
    use MethodInitializer;
15
16
    /** @var DocLexer */
17
    private $lexer;
18
19
    public function initialize() : void
20
    {
21
        $this->lexer = new DocLexer();
22
    }
23
24
    /**
25
     * @Revs(500)
26
     * @Iterations(5)
27
     */
28
    public function benchMethod() : void
29
    {
30
        $this->lexer->setInput($this->methodDocBlock);
31
    }
32
33
    /**
34
     * @Revs(500)
35
     * @Iterations(5)
36
     */
37
    public function benchClass() : void
38
    {
39
        $this->lexer->setInput($this->classDocBlock);
40
    }
41
}
42