Passed
Push — main ( 724a5a...47e974 )
by Chema
06:46 queued 02:34
created

DocBlockResolverPhpDocBased::getFactory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Benchmark\ServiceResolver;
6
7
use Gacela\Framework\AbstractFactory;
8
use Gacela\Framework\ServiceResolverAwareTrait;
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 ServiceResolverAwareTrait;
19
20
    /**
21
     * Get factory through PHPDoc-based resolution (slower path).
22
     * This will use searchClassOverDocBlock() in DocBlockResolver for string parsing.
23
     * No @ServiceMap 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