ChangePasswordFormFactory::createService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
namespace ZfcUser\Factory\Form;
3
4
use Zend\ServiceManager\FactoryInterface;
5
use Zend\ServiceManager\ServiceLocatorInterface;
6
use ZfcUser\Form\ChangePassword;
7
use ZfcUser\Form\ChangePasswordFilter;
8
use ZfcUser\Options;
9
10
class ChangePasswordFormFactory implements FactoryInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function createService(ServiceLocatorInterface $serviceManager)
16
    {
17
        /* @var $options Options\ModuleOptions */
18
        $options = $serviceManager->get('zfcuser_module_options');
19
20
        $inputFilter = new ChangePasswordFilter($options);
21
22
        $form = new ChangePassword(null, $options);
23
        $form->setInputFilter($inputFilter);
24
25
        return $form;
26
    }
27
}
28