Passed
Pull Request — main (#339)
by Chema
05:43 queued 01:20
created

DocBlockResolverPhpDocBased::getFactory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Benchmark\DocBlockResolver;
6
7
use Gacela\Framework\AbstractFactory;
8
use Gacela\Framework\DocBlockResolverAwareTrait;
9
10
/**
11
 * Test class for benchmarking PHPDoc-based resolution.
12
 * Uses only PHPDoc (no attributes) for performance comparison.
13
 *
14
 * @method AbstractFactory getFactory()
15
 */
16
final class DocBlockResolverPhpDocBased
17
{
18
    use DocBlockResolverAwareTrait;
19
20
    /**
21
     * Get factory through PHPDoc-based resolution (slower path).
22
     * This will use searchClassOverDocBlock() in DocBlockResolver for string parsing.
23
     * No @Doc attribute, so the resolver will fall through to regex-based parsing.
24
     */
25
    public function getFactory(): AbstractFactory
26
    {
27
        /** @var AbstractFactory $factory */
28
        $factory = $this->__call('getFactory', []);
29
30
        return $factory;
31
    }
32
}
33