DeleteViewModel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntity() 0 4 1
A setEntity() 0 4 1
A getErrors() 0 4 1
A setErrors() 0 4 1
1
<?php
2
3
namespace Sebaks\Crud\View\Model;
4
5
use Zend\View\Model\ViewModel;
6
use T4webDomainInterface\EntityInterface;
7
8
class DeleteViewModel extends ViewModel implements DeleteViewModelInterface
9
{
10
    /**
11
     * @var EntityInterface
12
     */
13
    private $entity;
14
15
    /**
16
     * @var array
17
     */
18
    private $errors;
19
20
    /**
21
     * @return EntityInterface
22
     */
23
    public function getEntity()
24
    {
25
        return $this->entity;
26
    }
27
28
    /**
29
     * @param EntityInterface $entity
30
     */
31
    public function setEntity(EntityInterface $entity)
32
    {
33
        $this->entity = $entity;
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function getErrors()
40
    {
41
        return $this->errors;
42
    }
43
44
    /**
45
     * @param array $errors
46
     */
47
    public function setErrors(array $errors)
48
    {
49
        $this->errors = $errors;
50
    }
51
}
52