AbstractMessageFormFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 46
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\Messaging\Form\FormFactory;
12
13
use Symfony\Component\Form\AbstractType;
14
use Symfony\Component\Form\FormFactoryInterface;
15
16
/**
17
 * Instantiates forms for adding a message
18
 *
19
 * @author Michiel Boeckaert <[email protected]>
20
 */
21
abstract class AbstractMessageFormFactory
22
{
23
    /**
24
     * The Symfony form factory
25
     *
26
     * @var FormFactoryInterface
27
     */
28
    protected $formFactory;
29
30
    /**
31
     * The message form type
32
     *
33
     * @var AbstractType
34
     */
35
    protected $formType;
36
37
    /**
38
     * The name of the form
39
     *
40
     * @var string
41
     */
42
    protected $formName;
43
44
    /**
45
     * The FQCN of the message model
46
     *
47
     * @var string
48
     */
49
    protected $modelClassName;
50
51
    /**
52
     * Constructor.
53
     *
54
     * @param FormFactoryInterface $formFactory    A form factory instance
55
     * @param AbstractType         $formType       The form type
56
     * @param string               $formName       Name of the form
57
     * @param string               $modelClassName FQCN of the form model
58
     */
59
    public function __construct(FormFactoryInterface $formFactory, AbstractType $formType, $formName, $modelClassName)
60
    {
61
        $this->formFactory = $formFactory;
62
        $this->formType = $formType;
63
        $this->formName = $formName;
64
        $this->modelClassName = $modelClassName;
65
    }
66
}
67