Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
63.64% covered (warning)
63.64%
7 / 11
CRAP
87.18% covered (warning)
87.18%
34 / 39
FormFactoryBuilder
0.00% covered (danger)
0.00%
0 / 1
63.64% covered (warning)
63.64%
7 / 11
25.21
87.18% covered (warning)
87.18%
34 / 39
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 setResolvedTypeFactory
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 addExtension
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 addExtensions
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 addType
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 addTypes
0.00% covered (danger)
0.00%
0 / 1
2.15
66.67% covered (warning)
66.67%
2 / 3
 addTypeExtension
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
3 / 3
 addTypeExtensions
0.00% covered (danger)
0.00%
0 / 1
2.15
66.67% covered (warning)
66.67%
2 / 3
 addTypeGuesser
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 addTypeGuessers
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 getFormFactory
0.00% covered (danger)
0.00%
0 / 1
11.03
93.75% covered (success)
93.75%
15 / 16
<?php
/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Symfony\Component\Form;
use Symfony\Component\Form\Extension\Core\CoreExtension;
/**
 * The default implementation of FormFactoryBuilderInterface.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class FormFactoryBuilder implements FormFactoryBuilderInterface
{
    private $forceCoreExtension;
    /**
     * @var ResolvedFormTypeFactoryInterface
     */
    private $resolvedTypeFactory;
    /**
     * @var FormExtensionInterface[]
     */
    private $extensions = [];
    /**
     * @var FormTypeInterface[]
     */
    private $types = [];
    /**
     * @var FormTypeExtensionInterface[]
     */
    private $typeExtensions = [];
    /**
     * @var FormTypeGuesserInterface[]
     */
    private $typeGuessers = [];
    public function __construct(bool $forceCoreExtension = false)
    {
        $this->forceCoreExtension = $forceCoreExtension;
    }
    /**
     * {@inheritdoc}
     */
    public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory)
    {
        $this->resolvedTypeFactory = $resolvedTypeFactory;
        return $this;
    }
    /**
     * {@inheritdoc}
     */
    public function addExtension(FormExtensionInterface $extension)
    {
        $this->extensions[] = $extension;
        return $this;
    }
    /**
     * {@inheritdoc}
     */
    public function addExtensions(array $extensions)
    {