Passed
Push — di ( 61d74f...f00c6d )
by Arnaud
15:03 queued 11:43
created

BuilderFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of Cecil.
5
 *
6
 * (c) Arnaud Ligny <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cecil;
15
16
use Symfony\Component\DependencyInjection\ContainerInterface;
17
18
/**
19
 * Builder Factory for creating Builder instances.
20
 *
21
 * This factory provides a centralized way to create Builder instances
22
 * from the dependency injection container.
23
 */
24
class BuilderFactory
25
{
26
    /**
27
     * Creates a Builder instance from the dependency injection container.
28
     *
29
     * @param ContainerInterface $container The DI container
30
     * @return Builder The configured Builder instance
31
     */
32
    public static function create(ContainerInterface $container): Builder
33
    {
34
        return $container->get(Builder::class);
35
    }
36
}
37