UpdateViewModel::setEntity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Sebaks\Crud\View\Model;
4
5
use Zend\View\Model\ViewModel;
6
use T4webDomainInterface\EntityInterface;
7
8 View Code Duplication
class UpdateViewModel extends ViewModel implements UpdateViewModelInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @var EntityInterface
12
     */
13
    private $entity;
14
15
    /**
16
     * @var array
17
     */
18
    private $errors;
19
20
    /**
21
     * @var array
22
     */
23
    private $inputData;
24
25
    /**
26
     * @return EntityInterface
27
     */
28
    public function getEntity()
29
    {
30
        return $this->entity;
31
    }
32
33
    /**
34
     * @param EntityInterface $entity
35
     */
36
    public function setEntity(EntityInterface $entity)
37
    {
38
        $this->entity = $entity;
39
    }
40
41
    /**
42
     * @return array
43
     */
44
    public function getErrors()
45
    {
46
        return $this->errors;
47
    }
48
49
    /**
50
     * @param array $errors
51
     */
52
    public function setErrors(array $errors)
53
    {
54
        $this->errors = $errors;
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getInputData()
61
    {
62
        return $this->inputData;
63
    }
64
65
    /**
66
     * @param array $inputData
67
     */
68
    public function setInputData(array $inputData)
69
    {
70
        $this->inputData = $inputData;
71
    }
72
}
73