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

DocLexerPerformanceBench   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A benchClass() 0 3 1
A initialize() 0 3 1
A benchMethod() 0 3 1
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