Completed
Push — develop ( 6adcbb...6abf52 )
by
unknown
10:12
created

JobDescriptionLabelRequirements   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 2
cbo 2
dl 0
loc 49
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getHydrator() 0 8 2
A init() 0 23 1
A getInputFilterSpecification() 0 12 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 * @author    [email protected]
9
 */
10
11
namespace Jobs\Form;
12
13
use Core\Form\Form;
14
use Core\Entity\Hydrator\EntityHydrator;
15
use Zend\InputFilter\InputFilterProviderInterface;
16
use Core\Form\ViewPartialProviderInterface;
17
use Jobs\Form\Hydrator\JobDescriptionHydrator;
18
19
/**
20
 * Defines the formular field "requirements" of a job opening
21
 *
22
 * @package Jobs\Form
23
 */
24
class JobDescriptionLabelRequirements extends Form implements InputFilterProviderInterface
25
{
26
27
    public function getHydrator()
28
    {
29
        if (!$this->hydrator) {
30
            $hydrator = new JobDescriptionHydrator();
31
            $this->setHydrator($hydrator);
32
        }
33
        return $this->hydrator;
34
    }
35
36
    public function init()
37
    {
38
        $this->setName('jobs-form-label-requirements');
39
        $this->setAttributes(
40
            array(
41
            'id' => 'jobs-form-label-requirements',
42
            'data-handle-by' => 'yk-form'
43
            )
44
        );
45
46
        $this->add(
47
            array(
48
            'type' => 'Text',
49
            'name' => 'description-label-requirements',
50
            'options' => array(
51
//                'use_as_base_fieldset' => true,
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
52
//                'placeholder' => 'Requirements'
53
            ),
54
            )
55
        );
56
57
58
    }
59
60
    public function getInputFilterSpecification()
61
    {
62
        return array(
63
            'description-label-requirements' => array(
64
                'filters' => array(
65
                    array(
66
                        'name' => 'Core\XssFilter'
67
                    )
68
                )
69
            )
70
       );
71
    }
72
}
73